Commit 0bd9d9f2 authored by Jim Fulton's avatar Jim Fulton

Brian added loggic to set bobo-specific headers to transmit exception

info.
parent b848b28c
......@@ -3,7 +3,7 @@
__doc__='''CGI Response Output formatter
$Id: Response.py,v 1.13 1997/04/11 23:13:23 jim Exp $'''
$Id: Response.py,v 1.14 1997/04/12 17:17:32 jim Exp $'''
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
......@@ -55,6 +55,10 @@ $Id: Response.py,v 1.13 1997/04/11 23:13:23 jim Exp $'''
# (540) 371-6909
#
# $Log: Response.py,v $
# Revision 1.14 1997/04/12 17:17:32 jim
# Brian added loggic to set bobo-specific headers to transmit exception
# info.
#
# Revision 1.13 1997/04/11 23:13:23 jim
# Fixed cookies.
#
......@@ -115,7 +119,7 @@ $Id: Response.py,v 1.13 1997/04/11 23:13:23 jim Exp $'''
#
#
#
__version__='$Revision: 1.13 $'[11:-2]
__version__='$Revision: 1.14 $'[11:-2]
import string, types, sys, regex, regsub
......@@ -474,6 +478,17 @@ class Response:
try: get_transaction().abort()
except: pass
try:
# Try to capture exception info for bci calls
et=regsub.gsub('\n','\t\n',str(t))
ev=regsub.gsub('\n','\t\n',str(v))
if string.find(ev,'<html>') >= 0: ev='bobo exception'
self.setHeader('bobo-exception-type',et)
self.setHeader('bobo-exception-value',ev)
except:
# Dont try so hard that we cause other problems ;)
pass
self.setStatus(t)
if self.status >= 300 and self.status < 400:
if type(v) == types.StringType and absuri_re.match(v) >= 0:
......
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