When you want to use objects from the .NET Framework in C/AL code, one of the main challenges is to handle exceptions that the methods of these objects may throw. Eventually, if not handled, they will basically bubble up as runtime errors, halting the current operation a user is doing without having a chance to properly display errors in a user-friendly format.

For more details check following links :


You can refer my earlier post too using below link :

Filed under: Corfu Navision 2016, Development Tips, How To, Information, Tip & Tricks, TryFunction Tagged: 2016, Catch, Dynamics, Functions, Microsoft, Navision, Net, Try