Here is what I'm trying to do.
I am calling code which eventually leads us to Classes\DimensionDefaultingEngine\constructForMainAccountId method. This method will throw the following error correctly:
if (!_mainAccountId || !_accountStructureId)
{
throw error(Error::wrongUseOfFunction(funcName()));
}
The account structure for the main account is not setup correctly. This is perfectly fine. The error should be thrown.
What I want to do is 'catch' this thrown error so that I can give the user a more meaningful message to have them fix the problem.
try { ...}
catch (Exception::error){
error("Meaningful message");
}
This try / catch doesn't seem to want to do anything.
*This post is locked for comments