Exception Handling Worksheet
Introduction
Exception Handling is an AlchemyJ Component which helps you manage all exception handling scenario in one place. You can define the error condition of each error using Excel formula and the component will raise an exception if such condition becomes true when a function point is run.
This component uses ajRaiseError to raise error. Refer to ajRaiseError if you want to learn more about it.
To add the Exception Handling worksheet, go to the AlchemyJ ribbon, click Add Component, select Exception Handling.
Configuration
Configuration Item | Description |
---|---|
Active | Indicate whether this exception handling is active or not. TRUE - Active FALSE - Inactive |
Category | User defined exception category. |
Exception Description | Description of the exception. |
Function Point | Function point name related to this exception. If it is empty, then the exception can be raised for all function points. Fill in the name of the function point here if this exception applies to one function point only. |
Exception Detection | Provide the formula that detects when an exception should be raised. The formula should return TRUE or FALSE. For example: =isError(BizLogic!A4) =AND(BizLogic!B20>0, BizLogic!B20<10) FALSE - No error detected. TRUE - Error detected and should raise error for specified function points. |
Exception Message | User defined exception message to be raised. It is a parameter to be used in ajRaiseError. |
Exception Code | User defined exception code. It is a parameter to be used in ajRaiseError. |
Exception Address | The cell address that produce this error. It is a parameter to be used in ajRaiseError. |
Is Current Function Point | It is a logical column to check whether this exception handling belongs to current running function point. It will be TRUE when Function Point is blank or AlchemyJ_FunctionPoint in %%SysRuntime is equals to the function point name inputted in column Function Point. The default formula is =OR([@[Function Point]]="", [@[Function Point]]=AlchemyJ_FunctionPoint). |
Exception Fired | It is a logical column to determine whether should execute the AlchemyJ extended function ajRaiseError. The default formula is =AND([@Active],[@[Exception Detection ]],[@[Is Current Function Point]]) |
Raise Exception Status | When Exception Fired is TRUE, execute AlchemyJ extended function ajRaiseError to raise error to error list. The default formula is =IF([@[Exception Fired]],IFERROR(ajRaiseError([@[Exception Message]],[@[Exception Code]],[@[Exception Address]]), FALSE), FALSE) |
Example
Please refer to Recipe Book Exception Handling for how to use the Exception Handling component