Exception handling syntax: Difference between revisions

Content deleted Content added
C: C doesn't support exceptions. The provided code is just a possible workaround
EinRob (talk | contribs)
No edit summary
Line 1,069:
Case 0 'this line is required when using 'Case Else' clause because of the lack of "Is" keyword in VBScript Case statement
'no exception
Case ERRORNUMBERSOME_ERRORNUMBER
'exception handling
Case Else
Line 1,150:
'do Something (only one statement recommended)
.Catch: On Error GoTo 0: Select Case .Number 'Call Try.Catch() procedure. Then switch off error handling. Then use "switch-like" statement on result of Try.Number property (value of property Err.Number of build-in Err object)
Case ERRORNUMBERSOME_ERRORNUMBER
'exception handling
Case Is <> 0 'When Err.Number is zero, no error has occurred