Add Extra Arguments to Global Handler

Hi there,

Does anybody now if it is possible to pass extra arguments to the Global Exception Handler? (other than the two that come predefined).

Thanks

@RockSolid

I guess we can add extra arguments as per our requirement but we can’t delete predefined arguments.

Hi Lakshman,

Nop, that’s not the right answer. You can add as many arguments as you want. The problem is that, as it is not being invoke, you can’t define what values are those arguments going to take.

I actually just found a solution myself:
errorinfo (one of the predefined arguments, ExceptionHandlerArg type) has as property .Variables, which returns a Dictionary where the Keys represent the name of the variables (in the scope where the error occurred) and the Values represent the respective values of the the variables (again, in the scope where the error occurred).

So you can use this to pass global values/arguments to the exception handler.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.