throw | |
·
Operation | Throw an exception |
·
Format | |
·
Direct Format | |
·
Forms | throw = 255, 28 (0xFF, 0x1C)
|
·
Stack | ..., working1, ..., workingN, object => ..., object |
· Description | The object is popped from the stack as
type ptr . The stack is then reset to the same
as the current method's exception frame height. Then,
object is re-pushed onto the stack and control is
passed to the current method's exception matching code. |
· Notes | This is used to throw exceptions within methods that
have an enter_try instruction. Use throw_caller
if the method does not include try blocks.
Setting the stack height to the exception frame height ensures
that all working values are removed from the stack prior to entering
the exception matching code. |
throw_caller | |
·
Operation | Throw an exception to the caller of this method |
·
Format | |
·
Direct Format | |
·
Forms | throw_caller = 255, 29 (0xFF, 0x1D)
|
·
Stack | ..., working1, ..., workingN, object => ..., object |
· Description | The object is popped from the stack as
type ptr . The call frame stack is then unwound
until a call frame with a non-zero exception frame height is found.
The stack is then reset to the specified exception frame height.
Then, object is re-pushed onto the stack and control is
passed to the call frame method's exception matching code. |
· Notes | This is used to throw exceptions from within methods that
do not have an enter_try instruction. Use throw
if the method does include try blocks. |