Table of Contents

Class UnexpectedMagicException

Namespace
ValveResourceFormat.Utils
Assembly
ValveResourceFormat.dll

Exception thrown when an unexpected magic number or value is encountered.

public class UnexpectedMagicException : Exception, ISerializable

Inheritance

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

message string

The error message.

magic int

The unexpected magic value.

nameofMagic string?

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

message string

The error message.

magic uint

The unexpected magic value.

nameofMagic string?

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

message string

The error message.

magic string

The unexpected magic value.

nameofMagic string?

The name of the magic parameter.

Properties

Message

Gets a message that describes the current exception.

public override string Message { get; }

Property Value

string

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

condition bool

The condition to check.

actualMagic T

The actual magic value.

conditionExpression string?

The condition expression string.

Type Parameters

T

The type of the actual magic value.