class documentation

class ErrorType(_Type):

View In Hierarchy

Special type that represents a type that couldn't be determined for some reason.

For example, debug objects like PDBs have many invariants in their formats that could be violated by a particular PDB, resulting in erroneous types.

This type is different from UnresolvedDeclaration in that the latter is a normal occurrence when a type is opaque, while an ErrorType indicates an erroneous debug object or a limitation of the debug object parser.

Method __eq__ Compares the instance for equality with an object.
Method __hash__ Returns the hash for this value.
Method __init__ Initializes a new instance of this class from its error message.
Method __ne__ Compares the instance for equality with an object.
Method __str__ Returns the nicely printable string representation of this instance.
Method as_bytes Cast this type to a RawBuffer so that it can be read as a series of bytes.
Method description The short description of this type.
Method message The error message that is specific to this instance.
Method _construct_type Return the underlying construct instance
Instance Variable _message Undocumented

Inherited from Type:

Method is_context_sensitive Whether the context argument needed by some methods actually has an effect.
Method parse Parses the value of an instance of this type from a raw buffer, possibly depending on the context.
Method size_bytes The minimal number of bytes necessary to hold an instance of this type, possibly depending on the context.
Method to_bytes Build a byte buffer from a value of this type.
Method _resolve Uses the resolver to return a resolved version of the type, if possible.
def __eq__(self, o):

Compares the instance for equality with an object.

  • if the object is not an ErrorType, it will never be equal to this instance.
  • otherwise, two ErrorType instances are considered equal if they have the same message.
Parameters
o:objectUndocumented
Returns
boolUndocumented
def __hash__(self):

Returns the hash for this value.

Returns
intUndocumented
def __init__(self, message):

Initializes a new instance of this class from its error message.

Parameters
message:strUndocumented
def __ne__(self, o):

Compares the instance for equality with an object.

  • if the object is not an ErrorType, it will never be equal to this instance.
  • otherwise, two ErrorType instances are considered equal if they have the same message.
Parameters
o:objectUndocumented
Returns
boolUndocumented
def __str__(self):

Returns the nicely printable string representation of this instance.

Returns
strUndocumented
def as_bytes(self, size):

Cast this type to a RawBuffer so that it can be read as a series of bytes.

Information

Parameters
size:intthe size in bytes of the desired RawBuffer. Since the ErrorType is not aware of the size the type should have, this parameter allows to specify it.
Returns
_RawBufferUndocumented
def description(self):

The short description of this type.

For named types, it is the name of the type. For other types, it is generally __str__.

Returns
strUndocumented
def message(self):

The error message that is specific to this instance.

Returns
strUndocumented
def _construct_type(self, context=None):

Return the underlying construct instance

Parameters
context:_Optional[Context]Undocumented
Returns
_construct.core.ConstructUndocumented
_message =

Undocumented