Types of exceptions

When an exception occurs, a message box that contains a description of the exception is displayed. The contents and design of the message box may vary, based on the type of exception that occurs. All exceptions occurring in PAH can be broadly classified into these types:

  1. Expected exceptions

    An exception that can occur under certain scenarios is called an expected exception. The application is aware of these scenarios and will have logic to handle these exceptions appropriately by catching them locally. All expected functional exceptions are assigned a low severity level. Expected exceptions can be classified as:

    • Functional exceptions

      This type of exception is thrown to serve a useful purpose. Such exceptions are intentionally introduced in various parts of the application to ensure user data validity and to enforce certain business rules and constraints. Examples include invalid data, business rule violations, and security or access-related exceptions.

    • Nonfunctional exceptions

      This type of exception does not serve a useful purpose and hinders the application flow. They occur unintentionally due to prevailing environmental conditions. The application is aware of the nonfunctional exception and can try to recover from it, but it may not always be able to advise the user on what exactly needs to be done to fix the problem. Certain expected, nonfunctional exceptions are considered critical if the application cannot fully recover from them. These are examples of expected, nonfunctional exceptions:

      • Network problems that leads to failure of database operations
      • Failure of database operations due to locked records
      • Attachment files that cannot be found
  2. Unexpected exceptions

    Exceptions that occur unexpectedly and are caught by the application’s default exception handling mechanism fall under this category. The application is not inherently aware of the causes of such exceptions and will need the help of an application administrator or developer to resolve them. These are examples of unexpected exceptions:

    • Unable to connect to the server
    • Unable to access a component
    • Exceptions arising from application defects

    All unexpected exceptions are assigned a severity level of critical.

The Notify Administrator option available on the exception dialog box generates a new mail message using the user’s default email client. This mail message is preloaded with the administrator’s email ID and also has the details of the exception included inline. Additionally, the mail body has a section titled Steps to replicate, and the user can choose to fill in the details of how the exception was encountered. Finally, the user can choose to include additional recipients and then send out the mail.

The Copy option that is also available on the exception dialog box enables the user to generate a .zip folder that contains the error log. The application settings and SCAH settings are also created in the .zip folder and are both generated in XML format. The user can then paste the compressed files in any folder in their computer. These files can be used to identify the exception error.