Menu

#4 Support for return codes and sqlplus "whenever ..."

open
nobody
None
5
2010-08-26
2010-08-26
No

This patch adds support from return codes (exit n) and sqlplus "whenever ..."

The whenever command is also extended to allow trapping of specific error messages,
for example
> whenever sqlerror exit 3
> whenever sqlerror=OR-06502 continue
would exit with return code 3 on all SQL errors, except ORA-06502.

Unfortunately, this removes support for the senora "set sqlerror ..." in favour of SQL+ compatability.

Also, a new error class (dberror) has been added to allow trapping of non-sql errors (for example connection error)

> whenever dberror exit 127

Hope this is useful for you

Cheers

Beorn

Discussion

  • Beorn Harris

    Beorn Harris - 2010-09-28

    Patch for whenever command and exception handling

     
  • Beorn Harris

    Beorn Harris - 2010-09-28

    Fixed a typo in the source changes.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.