Show / Hide Table of Contents

Class VmTypeException

Represents errors that occur when type checking fails in the virtual machine.

Inheritance
object
Exception
VmException
VmTypeException
Implements
ISerializable
Inherited Members
VmException.LineNumber
VmException.InstructionPointer
Exception.GetBaseException()
Exception.GetType()
Exception.ToString()
Exception.Data
Exception.HelpLink
Exception.HResult
Exception.InnerException
Exception.Message
Exception.Source
Exception.StackTrace
Exception.TargetSite
Exception.SerializeObjectState
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VM.Core.Instructions
Assembly: VM.dll
Syntax
public class VmTypeException : VmException, ISerializable

Constructors

VmTypeException(string, int, int)

Initializes a new instance of the VmTypeException class with a custom message.

Declaration
public VmTypeException(string message, int line = -1, int ip = -1)
Parameters
Type Name Description
string message

The error message that explains the reason for the exception.

int line

The source line number where the error occurred (-1 if unknown).

int ip

The instruction pointer value when the error occurred (-1 if unknown).

VmTypeException(VmType, VmType, int, int)

Initializes a new instance of the VmTypeException class with the actual and expected types.

Declaration
public VmTypeException(VmType actual, VmType expected, int line = -1, int ip = -1)
Parameters
Type Name Description
VmType actual

The actual type encountered.

VmType expected

The expected type.

int line

The source line number where the error occurred (-1 if unknown).

int ip

The instruction pointer value when the error occurred (-1 if unknown).

Properties

ActualType

Gets the actual type encountered during execution.

Declaration
public VmType ActualType { get; }
Property Value
Type Description
VmType

ExpectedType

Gets the expected type that should have been encountered.

Declaration
public VmType ExpectedType { get; }
Property Value
Type Description
VmType

Implements

ISerializable
In this article
Back to top Generated by DocFX