StudioWorks - Features - Error Handler

StudioWorks includes an extensive error handler object with an error prompt window. Whenever an error occurs in your code, you simply send an error message to the error handler object. The error handler logs the error in a log file on the client computer or a table in the database.

The error handler includes special methods which accept additional parameters and then fetch the error text for you and adds it to the error message details.

  • $logSQLError - pass in the statement object and it gets the error code & error text
  • $logFileOpsError - pass in the FileOps error code and it gets the FileOps error text
  • $logFTPError - pass in the FTP error code and it gets the FTP error text

The $construct, $timer, or $event method which started the sequence of method calls receives the return flag or null value indicating that an error has occurred. The starter method then sends a $promptonceLastError message to the error handler object. The error handler prompts the user with an appropriate error message. The user has options to print the error or email it to a support person.

The error message details include a list of all the methods in the error stack up to and including the method which logged the error; very helpful for debugging errors.