"Brian Beck" <[EMAIL PROTECTED]> writes:

> Hmm, do you use the 'default' method often?

All the time.  :-)

> As far as I know, explicitly raising cherrypy.NotFound is the only way
> to show that the resource requested through the 'default' controller
> method is not there... but maybe I'm rusty.

For example, I entered the toolbox and then CatWalk and requested an invalid
page:

================================================================================
09/Apr/2006:22:52:01 HTTP INFO Page handler: "The path '/catwalk/test123' was 
not found."
Traceback (most recent call last):
  File 
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py",
 line 106, in _run
    self.main()
  File 
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py",
 line 247, in main
    page_handler, object_path, virtual_path = self.mapPathToObject(path)
  File 
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py",
 line 313, in mapPathToObject
    raise cherrypy.NotFound(objectpath)
NotFound: 404
================================================================================

As you can see, the exception isn't raised by Turbogears code but it is
something done "automatically" by CherryPy itself. 

So, if you raise the exception yourself or you let it be raised by CP you'll
get the same result in the end: a cherrypy.NotFound exception.

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to