1. cherrypy
  2. CherryPy
Issue #307 resolved

_cperror.InternalError should be replaced by HTTPError(500, msg)

Robert Brewer
created an issue

InternalError is only used by _cputil, and then only in 2 cases. It would be better to get rid of InternalError completely, and raise HTTPError(500, msg) instead (so that pretty HTML is output).

Comments (4)

  1. Anonymous

    This will currently get turned into a 500 error by the default _cpOnError, butI agree with fumanchu, we should only use HTTPErrors. But where do we draw line and decide which errors should get passed on to cpOnError. Making this change only makes sense if we turn all exceptions raised by the server into http errors and if _cpOnError only handles exceptions raised by the application's page handler.

  2. Log in to comment