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

TOOL_ERR.MESSAGE built-in function

This function returns the formatted message associated with the ith error on the error stack (the default is the top-most error).

Syntax


FUNCTION TOOL_ERR.MESSAGE
(i PLS_INTEGER := TOPERROR)
RETURN VARCHAR2;

Parameters

Parameter

Description

i

An integer that specifies an error on the error stack.

Returns

An error message.

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