Exceptions through eSpaces

Exceptions through eSpaces


There are 2 things about exception handling in outsystems that really bother me, and after a lot of searching. I didn't find any explanation on this.... Could somebody please explain to me?

1. Is it really not possible to catch UserException defined in one eSpace, in the other eSpace? No user exceptions can be referenced, or am I missing something? As a result, I can only catch standard (system) exceptions, or those that are defined in the same eSpace - which doesn't make a lot of sense.

2. Why can not SecurityException or it's descendants be thrown from my action? It's not available in the list - only UserException and "Abort activity..." there.

In general, if I want to signal from one eSpace to it's consumer eSpace about an abnormal situation (which the exception is) and let it act according to the type of that situation - it looks like not achievable. Only by using ugly return values... or keeping everything in one eSpace. Is it so?
Hi Igor,

Regarding the first topic, It's currently due to a implementation limitation on how the references work. Yes I totally agree that should be possible, but unfortunatly not on the current version.
Here is the link for the "Idea" topic if you would like to vote on it: http://www.outsystems.com/ideas/100/allow-custom-exceptions-to-be-public-and-referenced-from-other-espaces/

As for the second ...not sure why It was decided to make it like that. I guess the use case for them never appeared in the design and by default options are always kept to the minimum.

João Rosado
Thanks João... At least now I know that it's by design... And voted for the improvement.