Quantcast
Channel: SCN: Message List - SAP SQL Anywhere
Viewing all articles
Browse latest Browse all 2182

Re: Catch an exception in event version 11

$
0
0

Before there was TRY CATCH, there was BEGIN ... EXCEPTION WHEN OTHERS THEN ... END which is (as far as I can tell) just as powerful. The trick is to capture the values in SQLCODE, SQLSTATE, and ERRORMSG() upon entry to the EXCEPTION WHEN OTHERS THEN section before any other code has a change to overwrite/change/reset those values.

For an introduction see SQL Anywhere: Tip: The All-Encompassing Try-Catch

For an extended example see SQL Anywhere: Dump and Continue


Viewing all articles
Browse latest Browse all 2182


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>