Well, it depends on when the error occurs. In the most common scenario, the answer is yes. This is assuming that you're referring to an exception that occurs after the process has called an object's action which has a code stage on it that then calls a method in the Global Code. Let's say it is in the Global Code inside of a method that is called from a Code Stage, then the exception should bubble up as follows:
- Exception occurs in a Global Code method and bubbles up (if there is no try/catch block)...
- Exception is now in the Code Stage that called the method in the Global Code and bubbles up (if there is no try/catch block around the method call in the Code Stage)...
- Exception is now still in the Object Action but outside the Code Stage and bubbles up (if there is no recover stage in the Action)
- Exception is now in the process or whatever component called the Object's Action and you can recover it here and handle it how you like.
However, If you put code a reference to a method (for example) directly into the Global Code, it should be run when the object is instantiated/initialized which means near the beginning of when the Process starts (before the process flow passes the Start stage in the Main Page of the process). So, if there is an error at this point, I would say at least I'm not aware of anyway to trap an exception at this point. I'm not 100% sure, but I think the process would terminate immediately at that point and recover stages wouldn't apply. I could be wrong here so it'd be good to test.
------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company