Best Practice For Invoke Other Module with Exception

Suppose I have a Login.xaml module that will login to a website. I invoke it in Main.xaml. The Login module may success or failed due to several reasons.

The Login module can terminate, throw exception, show error message, etc;
Or the Login module pass these messages to Main module and let Main decide what to do next?

What’s the best practice for these two modules to work together?

Its better the in the invoke workflow you can use a try catch and set a flag value. If successfull set flag as True and failure as False.

Pass this value to the main xaml. then terminate.

Better to use Reframework. There if the init state gets fail, it will move directly to end process state and terminate the execution.

Hi @AndrewGuo,

Error handling in REFramework or your own custom process will need a bulletproof error handling approach. I have a tutorial to help you achieve what you are trying. Hope this helps you.

The tutorial looks great. Thanks.

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