Guest zequion1 Posted January 18, 2021 Posted January 18, 2021 When an error occurs in any of my functions, execution is sent to a function that composes the error message.Many errors are not important and should not be displayed on the screen. imagine for example a loop where an error frequently occurs. The problem is that when I want to retrieve the "Number" property, if it doesn't exist in the exception type, an added try catch is produced which slows down the execution even more.How can I tell if the exception has "Number" without fires try catch? Function example (resume): public static dynamic Fcn_Error_Excepcion(dynamic ErrorExcp) { try { if (ErrorExcp is System.Exception) { // IF NOT EXISTS ErrorExcp.Number Try catch fires which slows down more the error checking. try{ Error_Number = ErrorExcp.Number; }catch(System.Exception ErrorExcp){} } } } Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.