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