Returns the error code for the ith error on the error stack (the default is the top-most error). If there are no errors on the stack, zero is returned.
FUNCTION Tool_Err.Code
(i PLS_INTEGER := TOPERROR)
RETURN NUMBER;
Parameter | Description |
---|---|
i | An integer that specifies an error on the error stack. |
The error code of the error specified.
/*
** Check for unexpected error, disregard it,
** and print any other error.
*/
PROCEDURE check_err IS
BEGIN
IF (TOOL_ERR.CODE != pkg_a.not_found) THEN
TEXT_IO.PUT_LINE(TOOL_ERR.MESSAGE);
END IF;
TOOL_ERR.POP;
END;