This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,592 Users
  • 2,269,776 Discussions
  • 7,916,825 Comments

Discussions

How catch ORA-error in javascript?

User524645-Oracle
User524645-Oracle Member Posts: 15 Employee
edited Jun 8, 2016 8:21AM in SQLcl

Hi!

I would like catch Oracle Db errors in my SQLcl script (wrote on JavaScript).

How I can make this?

Example:

script 

var v_xBinds = {};

if (util.execute("begin pl/sql syntax error here.  'end;',  v_xBinds)) { print(' Done.'); } else {   print('ERROR:'); }   }

/

Execution on wrong PL/SQL anonymouse block not raise any exception. How know ORA-error in script?

Thanx!

User524645-Oracle

Answers