Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# multiple exceptions same handler

catch (Exception ex)            
{                
    if (ex is FormatException || ex is OverflowException)
    {
        WebId = Guid.Empty;
        return;
    }

    throw;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #multiple #exceptions #handler
ADD COMMENT
Topic
Name
5+8 =