Sha256: aa441530cb1cd2aeab70a056b0592b16893e75301573ef462ffd2ad91693e8b8
Contents?: true
Size: 821 Bytes
Versions: 14
Compression:
Stored size: 821 Bytes
Contents
## # XException # General exception class for all Ext application exceptions. # @author Chris Scott # class XException < StandardError end ## # XExceptionResponse # A special extension of XResponse for returning responses where an Exception was raised. includes a back-trace in the response which # should probably be turned on with a debug switch only. # @author Chris Scott # class XExceptionResponse < XResponse attr_accessor :where ## # initialize # @param {XRequest} # @param {StandardError} # def initialize(req, e) super(req) @type = 'exception' @message = e.message @where = e.backtrace end def to_h data = super data[:type] = 'exception' data[:where] = @where.join("\n") data end end
Version data entries
14 entries across 14 versions & 6 rubygems