Camillia
asked on
Is this correct throw-catch?
Not sure if I'm doing this correctly.
private void SaveRecords()
{
try
{
Return.Save();
}
catch
{
//log to file here
..
///display error to user
message.Show("error");
}
}
In return class:
private void SaveRecords()
{
try
{
Return.Save();
}
catch (Exception e)
{
throw e;
}
}
private void SaveRecords()
{
try
{
Return.Save();
}
catch
{
//log to file here
..
///display error to user
message.Show("error");
}
}
In return class:
private void SaveRecords()
{
try
{
Return.Save();
}
catch (Exception e)
{
throw e;
}
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER