Which function is used to trap the error code and error message of an exception

Questions by majji sowjanya

Showing Answers 1 - 7 of 7 Answers

SQLERRM -- for error Message
SQLCODE -- for error Code.

eg.

EXCEPTION
     WHEN OTHERS THEN
     err_code := SQLCODE;
     err_msg := substr(SQLERRM,1,200);
     INSERT INTO audit_table (error_code,error_msg) 
     VALUES (err_code,err_msg);
END;

  Was this answer useful?  Yes

gomathi.e

  • Mar 20th, 2006
 

dbms_output.put_line 

using this we can trap the error

  Was this answer useful?  Yes

Rinku Rathore

  • Mar 21st, 2006
 

DBMS_OUTPUT.PUT_LINE is used to view the Error occured during execution, the functions which are used to trap the error are

  SQLCODE and SQLERRM

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions