S
Sid Price
I have a third party class library (C#) that I am expanding and using with
an application (VB.NET) and I am having trouble catching exceptions in the
application. The class library has an exception handler that it calls:
catch (Exception ex)
{
_sSessionId = null;
objUtils.HandleException("Error: Could not login: " + ex.Message);
return "";
}
The handler then throws an exception (the one my application should catch):
throw new Exception(Environment.NewLine + strMessage);
My application has a typical try/catch block but it does not catch the
thrown exception; here Login is in the class library:
Try
strSessionID = oVR.Login()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
I am pretty new to exception handling so perhaps I am misunderstanding, can
someone point me in the right direction please?
Sid.
an application (VB.NET) and I am having trouble catching exceptions in the
application. The class library has an exception handler that it calls:
catch (Exception ex)
{
_sSessionId = null;
objUtils.HandleException("Error: Could not login: " + ex.Message);
return "";
}
The handler then throws an exception (the one my application should catch):
throw new Exception(Environment.NewLine + strMessage);
My application has a typical try/catch block but it does not catch the
thrown exception; here Login is in the class library:
Try
strSessionID = oVR.Login()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
I am pretty new to exception handling so perhaps I am misunderstanding, can
someone point me in the right direction please?
Sid.