Using a try catch only gives a general error
I have 3 Stored procedures that run 1-2-3 highlighted in yellow
depending on which one fails I get the same error
How can I code this so I know which one of the 3 casue the error and then present a separate message depending on which one, so we can determine what is wrong in the database. These are caused someone did not keying in someones info. correctly. But Thats another issue.
DougP
I have 3 Stored procedures that run 1-2-3 highlighted in yellow
depending on which one fails I get the same error
How can I code this so I know which one of the 3 casue the error and then present a separate message depending on which one, so we can determine what is wrong in the database. These are caused someone did not keying in someones info. correctly. But Thats another issue.
Code:
...
strResourceEmail = sp_[highlight #FCE94F]SOWGetResourceEmailFromePrizeID[/highlight](Session("ePrizeID"))
strManagerTheName = sp_SOWGetMana[highlight #FCE94F][/highlight]gerNameFromResourceePrizeID(Session("ePrizeID"))
strManagerLName = Trim(Left(strManagerTheName, InStr(1, strManagerTheName, ",") - 1))
strManagerFName = Trim(Right(strManagerTheName, Len(strManagerTheName) - InStr(1, strManagerTheName, ",")))
strManagerEmail = sp_[highlight #FCE94F]SOWGetManagerEmailFromManagerName[/highlight](strManagerLName, strManagerFName)
Catch ex As Exception
Dim ErrorTitle As String = "Error in ResourceAddtime.aspx.vb - btnSubmitWeek_Click"
Dim PageName As String = System.IO.Path.GetFileName(System.Web.HttpContext.Current.Request.Url.AbsolutePath)
Dim Retval As String = ErrorTrap(PageName & " - " & System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message, ErrorTitle)
Finally
...
DougP