MCPcopy Create free account
hub / github.com/SimHacker/micropolis / Tcl_AddErrorInfo

Function Tcl_AddErrorInfo

micropolis-activity/src/tcl/tclbasic.c:925–958  ·  view source on GitHub ↗
(interp, message)

Source from the content-addressed store, hash-verified

923 * None.
924 *
925 * Side effects:
926 * The contents of message are added to the "errorInfo" variable.
927 * If Tcl_Eval has been called since the current value of errorInfo
928 * was set, errorInfo is cleared before adding the new message.
929 *
930 *----------------------------------------------------------------------
931 */
932
933void
934Tcl_AddErrorInfo(interp, message)
935 Tcl_Interp *interp; /* Interpreter to which error information
936 * pertains. */
937 char *message; /* Message to record. */
938{
939 register Interp *iPtr = (Interp *) interp;
940
941 /*
942 * If an error is already being logged, then the new errorInfo
943 * is the concatenation of the old info and the new message.
944 * If this is the first piece of info for the error, then the
945 * new errorInfo is the concatenation of the message in
946 * interp->result and the new message.
947 */
948
949 if (!(iPtr->flags & ERR_IN_PROGRESS)) {
950 Tcl_SetVar2(interp, "errorInfo", (char *) NULL, interp->result,
951 TCL_GLOBAL_ONLY);
952 iPtr->flags |= ERR_IN_PROGRESS;
953
954 /*
955 * If the errorCode variable wasn't set by the code that generated
956 * the error, set it to "NONE".
957 */
958
959 if (!(iPtr->flags & ERROR_CODE_SET)) {
960 (void) Tcl_SetVar2(interp, "errorCode", (char *) NULL, "NONE",
961 TCL_GLOBAL_ONLY);

Callers 15

tclunxut.cFile · 0.70
tclparse.cFile · 0.70
Tcl_UplevelCmdFunction · 0.70
InterpProcFunction · 0.70
Tcl_EvalFunction · 0.70
Tcl_CaseCmdFunction · 0.70
Tcl_ErrorCmdFunction · 0.70
Tcl_EvalCmdFunction · 0.70
Tcl_ForCmdFunction · 0.70
Tcl_ForeachCmdFunction · 0.70
Tcl_TimeCmdFunction · 0.70
Tcl_IfCmdFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected