Er_Throw - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Appendix C: Macros — Error Handling

ER_throw

Declaration:
ER_throw (int errorCode )
Category(ies):
Error Handling
Description:
This macro throws an exception to be caught in the ONERR or FINALLY
section of an enclosing TRY block. See chapter 9. Error Handling for a
complete discussion of throwing and catching exceptions.
Note: This is a macro version of ER_throwVar, but errorCode must be an integer
ER_throw compiles to shorter code than ER_throwVar — about two bytes
shorter per call.
errorCode — Error number signifying cause of exception.
Inputs:
Outputs:
None. This macro never returns — execution resumes at the ONERR or
FINALLY section of the enclosing TRY block.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
ER_throwFrame, ER_throwVar, FINALLY, ONERR, TRY
Example:
TRY
HANDLE h;
h = HeapAlloc(A_BIG_BUFFER);
if (h == H_NULL)
ER_throw(ER_MEMORY);
.
.
.
HeapFree(h)
ONERR
/* Do something about low memory condition */
.
.
.
ENDTRY
TI-89 / TI-92 Plus Developer Guide
constant.
Not for Distribution
1293
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents