Game.Tools.ErrorSeverity
Assembly:
Assembly-CSharp.dll
Namespace:
Game.Tools
Type:
public enum
Base:
System.Enum (underlying type: System.Int32)
Summary:
Represents the severity level of an error or validation result used by tools in the game. Determines how the tool or UI should treat the condition (ignore, override, warn, treat as an error, or cancel an operation). The default (0) value is None.
Fields
-
None
Represents no error / no special handling required. This is the default value (0). -
Override
Indicates the result should be treated as an override case — e.g., existing data may be replaced or an action should continue while overriding existing state. Generally less severe than a warning. -
Warning
A non-fatal issue that should be reported to the user but does not necessarily stop the operation. Typically shown as a warning prompt or icon. -
Error
A more serious problem that indicates an incorrect state or failure condition. Usually reported prominently and may prevent further processing until resolved. -
Cancel
Indicates the operation should be canceled (no error message). Used when the workflow should be aborted without classifying it as an error. -
CancelError
Indicates the operation must be canceled due to an error condition. Combines cancellation with an error-level severity.
Properties
- This enum type does not declare any properties.
Constructors
public ErrorSeverity()
Enums have an implicit default constructor; no explicit constructors are declared. The default underlying value is 0, corresponding to ErrorSeverity.None.
Methods
- No methods are declared on this enum. It inherits the standard System.Enum methods (ToString(), HasFlag(), CompareTo(), etc.).
Usage Example
using Game.Tools;
public void HandleToolResult(ErrorSeverity severity)
{
switch (severity)
{
case ErrorSeverity.None:
// Proceed normally
break;
case ErrorSeverity.Override:
// Apply change, possibly replacing existing data
break;
case ErrorSeverity.Warning:
// Show a warning to the user but allow continuation
break;
case ErrorSeverity.Error:
// Show error and block or require user action
break;
case ErrorSeverity.Cancel:
// Abort operation without showing an error
break;
case ErrorSeverity.CancelError:
// Abort operation and show an error
break;
}
}