Accessing Pervasive.SQL With Perl
Page Last Modified:
DBI + ODBC - Fetching Examples 3 - using RaiseError to catch errors
Instead of explicitly checking each call and using die to stop as soon as there's a problem, we can use the RaiseError attribute to fail instantly for us. We are still not explicitly freeing resources if there is a problem, all problems will be treated as critical and stop the running ot the code, and we have no control over the more detailed error message that is displayed.
If we need more control then we need to handle things ourselves.
Another way of catching any errors and handling the error message ourselves is shown here.
All content on this site is copyright