Exceptions Struct Reference

Table of basic exception types. More...

#include <vm.h>

Data Fields

KrkClassbaseException
 
KrkClasstypeError
 
KrkClassargumentError
 
KrkClassindexError
 
KrkClasskeyError
 
KrkClassattributeError
 
KrkClassnameError
 
KrkClassimportError
 
KrkClassioError
 
KrkClassvalueError
 
KrkClasskeyboardInterrupt
 
KrkClasszeroDivisionError
 
KrkClassnotImplementedError
 
KrkClasssyntaxError
 
KrkClassassertionError
 
KrkClassOSError
 
KrkClassThreadError
 
KrkClassException
 
KrkClassSystemError
 

Detailed Description

Table of basic exception types.

These are the core exception types, available in managed code from the builtin namespace. A single instance of this struct is attached to the global VM state so that C code can quickly access these exception types for use with krk_runtimeException.

See also
krk_runtimeException

Definition at line 63 of file vm.h.

Field Documentation

◆ argumentError

KrkClass* Exceptions::argumentError
Exceptions
ArgumentExceptionThe number of arguments passed to a function was not as expected.

Definition at line 66 of file vm.h.

◆ assertionError

KrkClass* Exceptions::assertionError
Exceptions
AssertionErrorAn assert statement failed.

Definition at line 78 of file vm.h.

◆ attributeError

KrkClass* Exceptions::attributeError
Exceptions
AttributeErrorAn attempt was made to reference an invalid object property.

Definition at line 69 of file vm.h.

◆ baseException

KrkClass* Exceptions::baseException
Exceptions
BaseExceptionThe base exception type.

Definition at line 64 of file vm.h.

◆ Exception

KrkClass* Exceptions::Exception
Exceptions
ExceptionThe main exception type that most other exceptions subclass.

Definition at line 81 of file vm.h.

◆ importError

KrkClass* Exceptions::importError
Exceptions
ImportErrorAn error was encountered when attempting to import a module.

Definition at line 71 of file vm.h.

◆ indexError

KrkClass* Exceptions::indexError
Exceptions
IndexErrorAn attempt was made to reference an invalid array index.

Definition at line 67 of file vm.h.

◆ ioError

KrkClass* Exceptions::ioError
Exceptions
IOErrorAn error was encountered in operating system's IO library.

Definition at line 72 of file vm.h.

◆ keyboardInterrupt

KrkClass* Exceptions::keyboardInterrupt
Exceptions
KeyboardInterruptAn interrupt signal was received.

Definition at line 74 of file vm.h.

◆ keyError

KrkClass* Exceptions::keyError
Exceptions
KeyErrorAn attempt was made to reference an invalid mapping key.

Definition at line 68 of file vm.h.

◆ nameError

KrkClass* Exceptions::nameError
Exceptions
NameErrorAn attempt was made to reference an undeclared global variable.

Definition at line 70 of file vm.h.

◆ notImplementedError

KrkClass* Exceptions::notImplementedError
Exceptions
NotImplementedErrorThe method is not implemented, either for the given arguments or in general.

Definition at line 76 of file vm.h.

◆ OSError

KrkClass* Exceptions::OSError
Exceptions
os.OSErrorRaised by os module functions.

Definition at line 79 of file vm.h.

◆ syntaxError

KrkClass* Exceptions::syntaxError
Exceptions
SyntaxErrorThe compiler encountered an unrecognized or invalid source code input.

Definition at line 77 of file vm.h.

◆ SystemError

KrkClass* Exceptions::SystemError
Exceptions
SystemErrorSomething we can throw when C code is broken.

Definition at line 82 of file vm.h.

◆ ThreadError

KrkClass* Exceptions::ThreadError
Exceptions
threading.ThreadErrorRaised by threading module functions.

Definition at line 80 of file vm.h.

◆ typeError

KrkClass* Exceptions::typeError
Exceptions
TypeErrorAn argument or value was not of the expected type.

Definition at line 65 of file vm.h.

◆ valueError

KrkClass* Exceptions::valueError
Exceptions
ValueErrorThe value of a parameter or variable is not valid.

Definition at line 73 of file vm.h.

◆ zeroDivisionError

KrkClass* Exceptions::zeroDivisionError
Exceptions
ZeroDivisionErrorA mathematical function attempted to divide by zero.

Definition at line 75 of file vm.h.


The documentation for this struct was generated from the following file: