[Main]
Name=ER_catch
Type=Function
Subtype=ROM Call
Header Files=error.h
Definition=short ER_catch (void *ErrorFrame);
See Also=TRY, ONERR, ENDTRY, FINALLY, ENDFINAL, ER_throwVar, ER_throw, ER_success

[ROM Call]
Index=$154

[Description]
Catches an error.

[Explanation]
ER_catch sets up an error handler. It saves the task state in
<I>ErrorFrame</I>, which is usually a buffer
of type <A HREF="$$LINK(ERROR_FRAME)">ERROR_FRAME</A>, and returns 0. The state consists of the values of A2-A7,
D3-D7, and PC. It also records a pointer to the previously saved state, which
makes it a linked list/stack, and yet another two system pointers.
<BR><BR>
If <A HREF="$$LINK(ER_throwVar)">ER_throwVar</A> is called later on (note that some TIOS routines may perform
<A HREF="$$LINK(ER_throwVar)">ER_throwVar</A> in a case of error), it simulates a return from the
previously called ER_catch, and the error code passed into <A HREF="$$LINK(ER_throwVar)">ER_throwVar</A>
will become the result of ER_catch. The processor must be in User mode for this
to work properly.
<BR><BR>
<B>Note:</B> Usually you should not call
this function explicitely. Use the <A HREF="$$LINK(TRY)">TRY</A> macro instead.

[References]
Out=unknown.h/NG_control, unknown.h/NG_such_that_index
In=ERD_dialog, ERD_process, TRY, alloc.h/HeapAllocESTACK, alloc.h/HeapWalk, bascmd.h/cmd_blddata, bascmd.h/cmd_circle, bascmd.h/cmd_cubicreg, bascmd.h/cmd_custom, bascmd.h/cmd_dialog, bascmd.h/cmd_disp, bascmd.h/cmd_disptbl, bascmd.h/cmd_drawfunc, bascmd.h/cmd_drawinv, bascmd.h/cmd_drawparm, bascmd.h/cmd_drawpol, bascmd.h/cmd_expreg, bascmd.h/cmd_get, bascmd.h/cmd_input, bascmd.h/cmd_inputstr, bascmd.h/cmd_linetan, bascmd.h/cmd_linreg, bascmd.h/cmd_lnreg, bascmd.h/cmd_logistic, bascmd.h/cmd_medmed, bascmd.h/cmd_newdata, bascmd.h/cmd_newpic, bascmd.h/cmd_newprob, bascmd.h/cmd_onevar, bascmd.h/cmd_output, bascmd.h/cmd_pause, bascmd.h/cmd_popup, bascmd.h/cmd_powerreg, bascmd.h/cmd_prompt, bascmd.h/cmd_quadreg, bascmd.h/cmd_quartreg, bascmd.h/cmd_request, bascmd.h/cmd_send, bascmd.h/cmd_sendcalc, bascmd.h/cmd_sendchat, bascmd.h/cmd_shade, bascmd.h/cmd_showstat, bascmd.h/cmd_sinreg, bascmd.h/cmd_slpline, bascmd.h/cmd_sorta, bascmd.h/cmd_sortd, bascmd.h/cmd_toolbar, bascmd.h/cmd_try, bascmd.h/cmd_twovar, basfunc.h/did_push_anti_deriv, basfunc.h/push_1st_derivative, basfunc.h/push_acosh, basfunc.h/push_asin, basfunc.h/push_asinh, basfunc.h/push_atan, basfunc.h/push_atanh, basfunc.h/push_comdenom, basfunc.h/push_cosh, basfunc.h/push_csolve, basfunc.h/push_czeros, basfunc.h/push_def_int, basfunc.h/push_desolve, basfunc.h/push_determinant, basfunc.h/push_exp, basfunc.h/push_expand, basfunc.h/push_extended_prod, basfunc.h/push_factor, basfunc.h/push_floor, basfunc.h/push_lim, basfunc.h/push_ln, basfunc.h/push_log10, basfunc.h/push_max, basfunc.h/push_min, basfunc.h/push_nsolve, basfunc.h/push_red_row_ech, basfunc.h/push_row_echelon, basfunc.h/push_simult, basfunc.h/push_sin2, basfunc.h/push_sinh, basfunc.h/push_solve, basfunc.h/push_str_to_expr, basfunc.h/push_summation, basfunc.h/push_tan, basfunc.h/push_tanh, basfunc.h/push_zeros, basop.h/push_dot_exponentiate, basop.h/push_equals, basop.h/push_exponentiate, basop.h/push_greater_than, basop.h/push_greater_than_or_equals, basop.h/push_less_than, basop.h/push_less_than_or_equals, basop.h/push_not_equals, basop.h/push_product, basop.h/push_substitute_simplify, basop.h/push_substitute_using_such_that, basop.h/push_sum, dialogs.h/Dialog, dialogs.h/VarNew, dialogs.h/VarSaveAs, estack.h/display_statements, estack.h/NG_approxESI, estack.h/NG_execute, estack.h/NG_graphESI, estack.h/NG_rationalESI, estack.h/NG_RPNToText, estack.h/NG_tokenize, estack.h/Parse1DExpr, estack.h/Parse2DExpr, estack.h/Parse2DMultiExpr, estack.h/push_internal_simplify, estack.h/push_parse_text, estack.h/TokenizeSymName, events.h/EV_centralDispatcher, events.h/EV_defaultHandler, events.h/EV_sendEventSide, events.h/handleRclKey, events.h/handleVarLinkKey, events.h/MO_modeDialog, files.h/TIOS_FOpen: FOpen, gdraw.h/GD_Text, gdraw.h/GR3_paint3d, gdraw.h/GR3_xyToWindow, graphing.h/gdb_recall, homescr.h/HomeExecute, homescr.h/HomePushEStack, homescr.h/HomeStorePair, link.h/LIO_Receive, link.h/OSLinkCmd, system.h/CTypeTable, timath.h/atof, unknown.h/are_units_consistent, unknown.h/de_initRes, unknown.h/de_loop, unknown.h/did_push_approx_inflection_point, unknown.h/did_push_var_val, unknown.h/does_push_fetch, unknown.h/dv_create_graph_titles, unknown.h/EV_quit, unknown.h/execute_graph_func, unknown.h/get_ub, unknown.h/GetStatValue, unknown.h/GM_Derivative, unknown.h/GM_DistArc, unknown.h/GM_Inflection, unknown.h/GM_Integrate, unknown.h/GM_Intersect, unknown.h/GM_Math1, unknown.h/GM_Shade, unknown.h/GM_TanLine, unknown.h/gr_ck_solvergraph, unknown.h/gr_execute_de, unknown.h/gr_execute_seq, unknown.h/GR_Pan, unknown.h/GR3_addContours, unknown.h/GR3_handleEvent, unknown.h/GraphOrTableCmd, unknown.h/GT_CalcDepVals, unknown.h/GT_DE_Init_Conds, unknown.h/GT_DspTraceCoords, unknown.h/GT_Trace, unknown.h/GZ_Fit, unknown.h/index_if_pushed_qquad_info, unknown.h/InitTimeSeq, unknown.h/NG_setup_graph_fun, unknown.h/push_ans_entry, unknown.h/push_format, unknown.h/push_gcd_then_cofactors, unknown.h/push_make_proper, unknown.h/push_parse_prgm_or_func_text, estack.h/push_simplify, unknown.h/push_sq_matrix_to_whole_number, unknown.h/push_user_func, unknown.h/recall_data_var, unknown.h/Regraph, unknown.h/replace_top_with_post_simplified, unknown.h/run_one_seq, unknown.h/seqWebInit, unknown.h/SP_Define, unknown.h/spike_in_editor, unknown.h/spike_optionD, unknown.h/spike_titles_in_editor, unknown.h/time_loop, unknown.h/tokenize_if_TI_92_or_text, unknown.h/VarStoreLink, vat.h/FolderDel, vat.h/FolderRename, vat.h/HSymDel, vat.h/SymFindFolderName, unknown.h/_ROM_CALL_3CD, unknown.h/_ROM_CALL_3F7, unknown.h/_ROM_CALL_3F8, unknown.h/_ROM_CALL_438, unknown.h/_ROM_CALL_455, unknown.h/_ROM_CALL_45B, unknown.h/_ROM_CALL_45E, unknown.h/_ROM_CALL_46F, unknown.h/_ROM_CALL_486, unknown.h/_ROM_CALL_494, unknown.h/_ROM_CALL_495, unknown.h/_ROM_CALL_4E6, unknown.h/_ROM_CALL_5F1
