This module contains the definitions for error reporting inside VM execution.
To raise a VmError use raiseVmError. To override the source location where the error is reported to have happened, use the overload that takes an additional TLineInfo.
raiseVmError must not be used outside of VM execution (rawExecute) nor inside VM code-generation (vmgen)
Procs
func raiseVmError(event: sink VmEvent; inst: InstantiationInfo) {.noinline, noreturn, ...raises: [VmError], tags: [].}
- Raises a VmError. Source Edit
Templates
template raiseVmError(event: VmEvent)
- Raises a VmError, using the source code position of the callsite as the inst value. Source Edit
template vmAssert(cond: bool)
- Raises an AssertionDefect or VM error depending on the compile- time configuration. Source Edit
template vmUnreachable(msg: sink string)
- Raises an internal VM error with msg as the message. Source Edit