(interp, message)
| 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 | |
| 933 | void |
| 934 | Tcl_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); |
no outgoing calls
no test coverage detected