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

TOOL_ERR.Nerrors

Description

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;