V
VMI
I have two classes in my web app: the interface and the DB connection.
In the method that connects to the DB, there's a try..catch statement
that looks like this:
public DataTable connectToDB()
{
try
{
// CONNECT ERROR. Wrong server name
}
catch(Exception ex)
{
throw new Exception("User::Login::Error occured.", ex);
}
How can I send the Exception message back to the method (in the
Interface class) that called connectToDB()? In other words, how can I
display the error in the catch{} in my webform?
Is there some type of log that automatically stores some of the error
information even if there's already code that handles it? For all
purposes, assume that I can't modify connectToDB() method because
everything's in the Production environment.
Thanks.
In the method that connects to the DB, there's a try..catch statement
that looks like this:
public DataTable connectToDB()
{
try
{
// CONNECT ERROR. Wrong server name
}
catch(Exception ex)
{
throw new Exception("User::Login::Error occured.", ex);
}
How can I send the Exception message back to the method (in the
Interface class) that called connectToDB()? In other words, how can I
display the error in the catch{} in my webform?
Is there some type of log that automatically stores some of the error
information even if there's already code that handles it? For all
purposes, assume that I can't modify connectToDB() method because
everything's in the Production environment.
Thanks.