I'm quite new to OutSystems, and I'm currently learning about exceptions and handlers. I've read through all the OutSystems documentation, but I'm finding this particular topic a bit confusing. I have two diagrams, and in one of them, the 'NotRegistered' handler is executing, while in the other one, the 'AllException' handler is executing. I'm really grateful for anyone who can help me understand the difference based on the diagrams.
Hello,
When you throw, in the server action, the "Not CFO" exception, it will be immediately handled in the AllException within that server action. In the client action no exception will be caught since it was taken care inside the server action.
Have in mind that "Not CFO" is a "User Exception" so you can never catch it outside this module since User exceptions are not shareable.
The "Not Registered" handler you have in that client action will only be caught if you throw them explicitely. "Not Registered" means that you don't have a login. This can be managed in the Common Flow instead of a client action since you have to be registered to even reach that code.
Thank you for your prompt response. I'm a bit confused about why the "notregistered" handler is executed in the first diagram, its explanation also states that the "notregistered" handler will be executed. In the first scenario,why Allexception" handler is being executed instead of the "notregistered" handler? Both diagrams appear identical, but there seem to be distinct scenarios, and I'm having trouble understanding the difference. Could u please explain both scenarios .
Where did you get those diagrams in the first place?
As far as I could read they are not totally correct. Try to read these articles
https://success.outsystems.com/documentation/11/developing_an_application/implement_application_logic/handle_exceptions/
https://success.outsystems.com/documentation/11/developing_an_application/implement_application_logic/handle_exceptions/exception_handling_mechanism/
https://success.outsystems.com/documentation/11/reference/outsystems_language/logic/implementing_logic/logic_tools/exception_handler/
Thankyou
Hi @Amritha venkitachalam
I'd be happy to help you understand the difference between the 'NotRegistered' handler and the 'AllException' handler in OutSystems. OutSystems is a low-code development platform that uses visual development to create web and mobile applications. In this context, exceptions and handlers are used to manage errors and unexpected situations in your applications.
'NotRegistered' Handler:
'AllException' Handler:
To summarize, the key difference is in the specificity of the handlers:
Hope this will help you!!
Kind regards
Sourabh Sharma
@Sourabh sharma Thankyou for your response.Could you tell me the difference according to my diagrams.Both diagrams appear identical, but there seem to be distinct scenarios, and I'm having trouble understanding the difference. Could u please explain both scenarios which includes a client and server action.
Hi @Amritha venkitachalam ,
Do these images you share come out of some course you are following ??
At first glance, the first one (with image #10) is just blatantly wrong It is not because at a higher level there is something more specific that the lower action will defer handling.
Closeness of the handler to the exception being thrown trumps specificity.
The explanation with #12 image seems entirely correct.
Discuss this with the person who wrote these pages, as he/she might want to revise the text.
Dorine
@Dorine Boudry Okay Thankyou so much for your help!
Hi @Amritha venkitachalam hope you're well
Judging specifically the two images you provided, seens to me that what's happening is:
I think that's similar to what @Dorine Boudry is saying also.
Hope i could help a bit.
Best regards!