Exception Handling in Preparation

Exception Handling in Preparation

  
Hi,

In a result of a OutDocumenter output (the Best Practices Report), one of the items refers to Exception Handling in Preparation, it says that they should be avoided.

I would like to know why?

Not urgent just for information.


Best Regards,
Nuno Mendes
Hello Nuno,

The preparation is the basic logic you have to load a screen. Errors here would render an incorrect or incomplete screen, and that is why it is not recommended that you handle exceptions there (as they would allow the screen rendering). The best practices report assumes that you cannot safely recover from a preparation exception.

This does not mean however that you should leave exceptions unhandled. You should always have generic exception handling at the screen flow level.

Hope this helped

João Gomes

PS: BTW, as all best practices, there may be exceptions to this rule
Thanks for the information.

Best Regards,
Nuno Mendes