Errp

errp returns the name of the script where an error occurred. It can be used in the error handling routine set by Onerrgo.

Syntax

 errp

Examples

 # Let's trigger an error (division by zero)Funprog DIV_BY_ZEROLocal Integer ZERO, ONE, RESULTLocal Char ERROR_MESSAGE(250)ONE=1 : ZERO=0Onerrgo ERR_HANDLERESULT = ONE / ZEROEnd ERROR_MESSAGE$ERR_HANDLEERROR_MESSAGE="Error"-num$(errn)-"raised on line"-num$(errl)-"in script"-errp-"Message:"-errmes$(errn)&-"Additional details:"-errmResume

Description

errp returns a script name. The result type is Char.
errp has only a significant value in the error handling routine.

See also

errn, errl, Onerrgo, errmes$, errm.