500-error ook callstack laten tonen (bij SQL-error)
svn path=/Website/trunk/; revision=32824
This commit is contained in:
@@ -304,7 +304,7 @@ if (Application("otap_environment") == "O" || Session("logging") > 0)
|
||||
|
||||
Response.Write("\n<br>" + ShowSourcecode(-8, +4));
|
||||
}
|
||||
LogErrorToFile(); // verwijderd ook last_sql
|
||||
LogErrorToFile(); // verwijdert ook last_sql
|
||||
|
||||
Response.End;
|
||||
|
||||
@@ -333,6 +333,10 @@ function ASPErrorText(extra)
|
||||
err += "\n<tr><td style='vertical-align:top'>"+props[v]+":</td><td>" + safeprop + "</td></tr>";
|
||||
}
|
||||
}
|
||||
if (Session("last_caller")) // vanuit m_connections.inc
|
||||
{
|
||||
err += "\n<tr><td style='vertical-align:top'>Call stack:</td><td style='max-width: 800px;'>" + Session("last_caller") + "</td></tr>";
|
||||
}
|
||||
if (Session("last_sql")) // vanuit m_connections.inc
|
||||
{
|
||||
err += "\n<tr><td style='vertical-align:top'>Last SQL:</td><td style='max-width: 800px;'>" + Server.HTMLEncode(Session("last_sql")) + "</td></tr>";
|
||||
@@ -360,7 +364,8 @@ function LogErrorToFile()
|
||||
{
|
||||
__SafeDoLog("Session('customerId'): " + Session("customerId") + " <span style='font-size:9px;color:#444'>" + Request.ServerVariables("REMOTE_ADDR") + "</span>", "#f00");
|
||||
__SafeDoLog(ASPErrorText());
|
||||
Session.Contents.Remove("last_sql"); // Nu weg, anders wordt hij bij Sessions ook nog getoond
|
||||
Session.Contents.Remove("last_sql"); // Nu weg, anders worden ze bij Sessions ook nog getoond
|
||||
Session.Contents.Remove("last_caller");
|
||||
if (Request.ServerVariables("HTTP_REFERER").Count)
|
||||
__DoLog("Referer: " + Request.ServerVariables("HTTP_REFERER"));
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ function SafeExec( sql, catchErrors ) {
|
||||
if (!catchErrors)
|
||||
{
|
||||
Session("last_sql") = sql; // wordt door 500-error.asp opgepikt
|
||||
Session("last_caller") = __callerTekst(SafeExec.caller);
|
||||
throw e1; // Throw again
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user