S
sloan
Does anyone have any good articles on Exception Handing in DotNet.
As a "get rid of the API mode of knowing if something worked, we're not in
VB6 land anymore Dorothy".
I have a few people at work who keep writing code like below.
public string UpdateEmployee
{
string returnStatus = string.Empty;
try {
Database db = this.GetDatabase();
DbCommand dbCommand = db.GetStoredProcCommand("dbo.[uspAAAAAAAAAAAAAA]");
(dbCommand);
db.ExecuteNonQuery(dbCommand);
}
catch (Exception ex) {
sStatus = "ERROR updating Examiner table: " + ex.Message;
}
return returnStatus;
}
and I need some reference(s) to put a stop to this mess.
At least with API, you checked for = or != to 0.
err.Number
case --020303000003003
msg = "The blah blah blah failed"
Those were good times.
Any good articles are appreciated (esp if the directly tackle this
situation )
As a "get rid of the API mode of knowing if something worked, we're not in
VB6 land anymore Dorothy".
I have a few people at work who keep writing code like below.
public string UpdateEmployee
{
string returnStatus = string.Empty;
try {
Database db = this.GetDatabase();
DbCommand dbCommand = db.GetStoredProcCommand("dbo.[uspAAAAAAAAAAAAAA]");
(dbCommand);
db.ExecuteNonQuery(dbCommand);
}
catch (Exception ex) {
sStatus = "ERROR updating Examiner table: " + ex.Message;
}
return returnStatus;
}
and I need some reference(s) to put a stop to this mess.
At least with API, you checked for = or != to 0.
err.Number
case --020303000003003
msg = "The blah blah blah failed"
Those were good times.
Any good articles are appreciated (esp if the directly tackle this
situation )