#953: Missing Exception
-------------------------------------+--------------------------------------
Reporter:
elias....@gmail.com | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone:
Component: CherryPy code | Keywords:
-------------------------------------+--------------------------------------
Using Python 2.6 and CherryPy 3.1.2
Exception that is thrown for: '%d' % 'a' goes missing and instead I get a
404.
Code that demonstrates behavior on my system:
(For some reason the parameters play a role in this bug. Functions without
parameters do not have this problem.)
{{{
import cherrypy
class T:
def t(self, x, y=None):
return '%d' % 'a' # throw an exception
#return format('%d','a')
t.exposed = True
def index(self):
return '<a href="t?x=0">Click here</a>'
index.exposed = True
cherrypy.quickstart(T(), '/')
}}}
This will result in 404.
However, replacing '%d' % 'a' with format('%d','a') will throw an
exception as expected and result in 500.
--
Ticket URL: <
http://www.cherrypy.org/ticket/953>
CherryPy <
http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework