Class UnexpectedMagicException
- Namespace
- ValveResourceFormat.Utils
- Assembly
- ValveResourceFormat.dll
Exception thrown when an unexpected magic number or value is encountered.
public class UnexpectedMagicException : Exception, ISerializableInheritance
Implements
Inherited Members
Constructors
UnexpectedMagicException(string, int, string?)
Initializes a new instance of the ValveResourceFormat.Utils.UnexpectedMagicException class.
public UnexpectedMagicException(string message, int magic, string? nameofMagic = null)Parameters
messagestring-
The error message.
magicint-
The unexpected magic value.
nameofMagicstring?-
The name of the magic parameter.
UnexpectedMagicException(string, uint, string?)
Initializes a new instance of the ValveResourceFormat.Utils.UnexpectedMagicException class.
public UnexpectedMagicException(string message, uint magic, string? nameofMagic = null)Parameters
messagestring-
The error message.
magicuint-
The unexpected magic value.
nameofMagicstring?-
The name of the magic parameter.
UnexpectedMagicException(string, string, string?)
Initializes a new instance of the ValveResourceFormat.Utils.UnexpectedMagicException class.
public UnexpectedMagicException(string message, string magic, string? nameofMagic = null)Parameters
messagestring-
The error message.
magicstring-
The unexpected magic value.
nameofMagicstring?-
The name of the magic parameter.
Properties
Message
Gets a message that describes the current exception.
public override string Message { get; }Property Value
Methods
Assert<T>(bool, T, string?)
Asserts that a condition is true, throwing an exception if it's false.
public static void Assert<T>(bool condition, T actualMagic, string? conditionExpression = null)Parameters
conditionbool-
The condition to check.
actualMagicT-
The actual magic value.
conditionExpressionstring?-
The condition expression string.
Type Parameters
T-
The type of the actual magic value.