Exception: FrontendRescue::Error
- Inherits:
-
StandardError
- Object
- StandardError
- FrontendRescue::Error
- Defined in:
- lib/frontend_rescue/error.rb
Instance Method Summary collapse
- #backtrace ⇒ Object
-
#initialize(name, user_agent, message, trace, params) ⇒ Error
constructor
A new instance of Error.
- #user_agent ⇒ Object
Constructor Details
#initialize(name, user_agent, message, trace, params) ⇒ Error
Returns a new instance of Error.
3 4 5 6 7 8 |
# File 'lib/frontend_rescue/error.rb', line 3 def initialize(name, user_agent, , trace, params) @trace = trace.split("\n") rescue [] @user_agent = user_agent @params = params || {} super "Uncaught #{name} Error: #{}" end |
Instance Method Details
#backtrace ⇒ Object
10 11 12 13 14 |
# File 'lib/frontend_rescue/error.rb', line 10 def backtrace ["User Agent: #{user_agent}"] + @params.map{|k, v| "#{k}: #{v}"} + @trace end |
#user_agent ⇒ Object
16 17 18 |
# File 'lib/frontend_rescue/error.rb', line 16 def user_agent @user_agent end |