pub enum ClrError {
Show 20 variants
FileReadError(String),
ApiError(&'static str, i32),
MissingArguments,
CastingError(&'static str),
InvalidExecutable,
MethodNotFound,
PropertyNotFound,
NotDotNet,
MetaHostCreationError(String),
RuntimeInfoError(String),
RuntimeHostError(String),
RuntimeStartError,
DomainCreationError(String),
DefaultDomainError(String),
NoDomainAvailable,
NullPointerError(&'static str),
SafeArrayError(String),
VariantUnsupported,
GenericError(&'static str),
InvalidNtHeader,
}
Expand description
Represents errors that can occur when interacting with the .NET runtime or while handling .NET-related operations within an unmanaged application.
Variants§
FileReadError(String)
Raised when a .NET file cannot be read correctly.
§Arguments
{0}
- A message describing the file read error.
ApiError(&'static str, i32)
Raised when an API call fails, returning a specific HRESULT.
§Arguments
{0}
- The name of the API that failed.{1}
- The HRESULT code returned by the API indicating the specific failure.
MissingArguments
Raised when an entry point expects arguments but receives none.
CastingError(&'static str)
Raised when there is an error casting a COM interface to the specified type.
§Arguments
{0}
- The name of the type to which casting failed.
InvalidExecutable
Raised when the buffer provided does not represent a valid executable file.
MethodNotFound
Raised when a required method is not found in the .NET assembly.
PropertyNotFound
Raised when a required property is not found in the .NET assembly.
NotDotNet
Raised when the buffer does not contain a .NET application.
MetaHostCreationError(String)
Raised when there is a failure creating the .NET MetaHost.
§Arguments
{0}
- A message describing the failure to create the MetaHost.
RuntimeInfoError(String)
Raised when retrieving information about the .NET runtime fails.
§Arguments
{0}
- A message describing the error in runtime information retrieval.
RuntimeHostError(String)
Raised when the runtime host interface could not be obtained.
§Arguments
{0}
- A message describing the failure to obtain the runtime host interface.
RuntimeStartError
Raised when the runtime fails to start.
DomainCreationError(String)
Raised when there is an error creating a new AppDomain.
§Arguments
{0}
- A message describing the domain creation error.
DefaultDomainError(String)
Raised when the default AppDomain cannot be retrieved.
§Arguments
{0}
- A message describing the error in retrieving the default AppDomain.
NoDomainAvailable
Raised when no AppDomain is available in the runtime environment.
NullPointerError(&'static str)
Raised when a null pointer is passed to an API where a valid reference was expected.
§Arguments
{0}
- The name of the API that received the null pointer.
SafeArrayError(String)
Raised when there is an error creating a SafeArray.
§Arguments
{0}
- A message describing the SafeArray creation error.
VariantUnsupported
Raised when the type of a VARIANT is unsupported by the current context.
GenericError(&'static str)
Represents a generic error specific to the CLR.
§Arguments
{0}
- A message providing details about the CLR-specific error.
InvalidNtHeader
Related error if the PE file used in the loader does not have a valid NT HEADER