Forked from
DM / dm-docs
261 commits behind, 493 commits ahead of the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
dmHttpError.py 576 B
#!/usr/bin/env python
import cherrypy
from cherrypy import HTTPError
class DmHttpError(HTTPError):
def __init__ (self, httpCode, httpError, dmEx):
HTTPError.__init__(self, httpCode, httpError)
self.dmException = dmEx
def set_response(self):
HTTPError.set_response(self)
cherrypy.response.headers['Dm-Status-Code'] = self.dmException.getErrorCode()
cherrypy.response.headers['Dm-Status-Message'] = self.dmException.getErrorMessage()
cherrypy.response.headers['Dm-Exception-Type'] = self.dmException.getExceptionType()