A script-enabled browser is required for this page to function properly.

TOOL_ERR.NERRORS built-in function

This function returns the number of errors currently on the error stack.

Syntax


FUNCTION TOOL_ERR.NERRORS
RETURN PLS_INTEGER;

Returns

The number of error on the error stack.

Example


 /*
  ** Determine the number of errors 
  ** on the stack. Then, loop through stack, 
  ** and print out each error message.
 */
  PROCEDURE print_all_errors IS 
  number_of_errors PLS_INTEGER; 
   BEGIN
    EXCEPTION
     WHEN OTHERS THEN
     number_of_errors := TOOL_ERR.NERRORS; 
     FOR i IN 1..number_of_errors LOOP 
     TEXT_IO.PUT_LINE(TOOL_ERR.MESSAGE(i-1)); 
   END LOOP; 
END; 

See also

About the TOOL_ERR built-in package

TOOL_ERR built-in package