Hi! The resource not found exception can't be caught. I tried the following: def unitTest(self, REQUEST): "docstring" try: self._unitTest(REQUEST) except: import traceback traceback.print_exc() But I get the meaningless page: """ Site Error An error was encountered while publishing this resource. Resource not found Sorry, the requested resource does not exist. Check the URL and try again. Resource: QWERTZUIOP GET """ Why is the exception in _unitTest not caught by my exception handler? I would like to have a stacktrace. Yesterday I had a related strange behaviour: raise AssertionError behaved different than assert(0) the first was ignored, while the second did print the stacktrace (With <dtml-var error_tb> in standard_error_message) thomas -- Thomas Guettler <guettli@thomas-guettler.de> http://www.thomas-guettler.de
Thomas Guettler wrote at 2003-4-10 22:00 +0200:
The resource not found exception can't be caught. I tried the following:
def unitTest(self, REQUEST): "docstring" try: self._unitTest(REQUEST) except: import traceback traceback.print_exc()
But I get the meaningless page: """ Site Error An error was encountered while publishing this resource. Resource not found Sorry, the requested resource does not exist. Check the URL and try again. Resource: QWERTZUIOP GET """
Why is the exception in _unitTest not caught by my exception handler? I would like to have a stacktrace.
Almost surely, because the exception is caught inside your "_unitTest" and turned into an error page. Dieter
participants (2)
-
Dieter Maurer -
Thomas Guettler