|
Revision 103, 1.0 kB
(checked in by bkuhn, 8 months ago)
|
r129@hughes: bkuhn | 2008-05-01 21:46:34 -0400
- Merged upstream trac via: svk smerge /loblaw/local/branches/trac.upstream-r6969 .
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
#!/usr/bin/python |
|---|
| 2 |
# -*- coding: utf-8 -*- |
|---|
| 3 |
# |
|---|
| 4 |
# Copyright (C) 2003-2008 Edgewall Software |
|---|
| 5 |
# Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com> |
|---|
| 6 |
# All rights reserved. |
|---|
| 7 |
# |
|---|
| 8 |
# This software is licensed as described in the file COPYING, which |
|---|
| 9 |
# you should have received as part of this distribution. The terms |
|---|
| 10 |
# are also available at http://trac.edgewall.org/wiki/TracLicense. |
|---|
| 11 |
# |
|---|
| 12 |
# This software consists of voluntary contributions made by many |
|---|
| 13 |
# individuals. For the exact contribution history, see the revision |
|---|
| 14 |
# history and logs, available at http://trac.edgewall.org/log/. |
|---|
| 15 |
# |
|---|
| 16 |
# Author: Jonas Borgström <jonas@edgewall.com> |
|---|
| 17 |
|
|---|
| 18 |
try: |
|---|
| 19 |
from trac.web import fcgi_frontend |
|---|
| 20 |
fcgi_frontend.run() |
|---|
| 21 |
except SystemExit: |
|---|
| 22 |
raise |
|---|
| 23 |
except Exception, e: |
|---|
| 24 |
print 'Content-Type: text/plain\r\n\r\n', |
|---|
| 25 |
print 'Oops...' |
|---|
| 26 |
print |
|---|
| 27 |
print 'Trac detected an internal error:' |
|---|
| 28 |
print |
|---|
| 29 |
print e |
|---|
| 30 |
print |
|---|
| 31 |
import traceback |
|---|
| 32 |
import StringIO |
|---|
| 33 |
tb = StringIO.StringIO() |
|---|
| 34 |
traceback.print_exc(file=tb) |
|---|
| 35 |
print tb.getvalue() |
|---|