important improvement

This commit is contained in:
Miroslav Stampar
2010-12-26 13:20:52 +00:00
parent fcd01b3018
commit 569e060aab
5 changed files with 15 additions and 2 deletions

View File

@@ -1560,6 +1560,14 @@ def wasLastRequestDBMSError():
threadData = getCurrentThreadData()
return threadData.lastErrorPage and threadData.lastErrorPage[0] == threadData.lastRequestUID
def wasLastRequestHTTPError():
"""
Returns True if the last web request resulted in an errornous HTTP code (like 500)
"""
threadData = getCurrentThreadData()
return threadData.lastHTTPError and threadData.lastHTTPError[0] == threadData.lastRequestUID
def wasLastRequestDelayed():
"""
Returns True if the last web request resulted in a time-delay

View File

@@ -18,6 +18,7 @@ class ThreadData():
def __init__(self):
self.lastErrorPage = None
self.lastHTTPError = None
self.lastQueryDuration = 0
self.lastRequestUID = 0
self.valueStack = []