C
Charles
I have a component that throws various application
exceptions. I have a second component which is
responsible for alerting ops in the event of a major
problem. In order for it to be able to do this it needs
to be able to interrogate some custom properties on the
exception to diagnose the severity of the error. I can do
this by rethrowing the exception as follows:
Public Sub writeError(ByVal eException As
System.Exception
Try
Throw eException
Catch ex As MyAppException
If ex.Severity=1 then
End if
Catch ex as Excpetion
End try
Is there a neater way of doing this?
exceptions. I have a second component which is
responsible for alerting ops in the event of a major
problem. In order for it to be able to do this it needs
to be able to interrogate some custom properties on the
exception to diagnose the severity of the error. I can do
this by rethrowing the exception as follows:
Public Sub writeError(ByVal eException As
System.Exception
Try
Throw eException
Catch ex As MyAppException
If ex.Severity=1 then
End if
Catch ex as Excpetion
End try
Is there a neater way of doing this?