Commit 98f61a15 authored by Jim Fulton's avatar Jim Fulton

Added logic to better handle exceptions.

parent 718755c2
'''CGI Response Output formatter
$Id: Response.py,v 1.43 1998/12/02 16:58:54 jim Exp $'''
$Id: Response.py,v 1.44 1998/12/02 19:53:53 jim Exp $'''
#
# Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
# All rights reserved.
......@@ -51,10 +51,11 @@ $Id: Response.py,v 1.43 1998/12/02 16:58:54 jim Exp $'''
#
# (540) 371-6909
#
__version__='$Revision: 1.43 $'[11:-2]
__version__='$Revision: 1.44 $'[11:-2]
import string, types, sys, regex
from string import find, rfind, lower, upper, strip, split, join, translate
from types import StringType, InstanceType
nl2sp=string.maketrans('\n',' ')
......@@ -487,6 +488,8 @@ class Response:
except: pass
b=v
if isinstance(b,Exception): b=str(b)
if fatal:
if t is SystemExit and v.code==0:
tb=self.setBody(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment