Exception: ReactOnRails::PrerenderError
- Defined in:
- lib/react_on_rails/prerender_error.rb
Constant Summary collapse
- MAX_ERROR_SNIPPET_TO_LOG =
1000
Instance Attribute Summary collapse
-
#component_name ⇒ Object
readonly
TODO: Consider remove providing original
erras already have access toself.causeblog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/. -
#console_messages ⇒ Object
readonly
TODO: Consider remove providing original
erras already have access toself.causeblog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/. -
#err ⇒ Object
readonly
TODO: Consider remove providing original
erras already have access toself.causeblog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/. -
#js_code ⇒ Object
readonly
TODO: Consider remove providing original
erras already have access toself.causeblog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/. -
#props ⇒ Object
readonly
TODO: Consider remove providing original
erras already have access toself.causeblog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/.
Instance Method Summary collapse
-
#initialize(component_name: nil, err: nil, props: nil, js_code: nil, console_messages: nil) ⇒ PrerenderError
constructor
err might be nil if JS caught the error.
- #raven_context ⇒ Object
- #to_error_context ⇒ Object
- #to_honeybadger_context ⇒ Object
Constructor Details
#initialize(component_name: nil, err: nil, props: nil, js_code: nil, console_messages: nil) ⇒ PrerenderError
err might be nil if JS caught the error
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/react_on_rails/prerender_error.rb', line 12 def initialize(component_name: nil, err: nil, props: nil, js_code: nil, console_messages: nil) @component_name = component_name @err = err @props = props @js_code = js_code = backtrace, = (component_name, , err, js_code, props) super([, backtrace].compact.join("\n")) end |
Instance Attribute Details
#component_name ⇒ Object (readonly)
TODO: Consider remove providing original err as already have access to self.cause blog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/
9 10 11 |
# File 'lib/react_on_rails/prerender_error.rb', line 9 def component_name @component_name end |
#console_messages ⇒ Object (readonly)
TODO: Consider remove providing original err as already have access to self.cause blog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/
9 10 11 |
# File 'lib/react_on_rails/prerender_error.rb', line 9 def end |
#err ⇒ Object (readonly)
TODO: Consider remove providing original err as already have access to self.cause blog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/
9 10 11 |
# File 'lib/react_on_rails/prerender_error.rb', line 9 def err @err end |
#js_code ⇒ Object (readonly)
TODO: Consider remove providing original err as already have access to self.cause blog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/
9 10 11 |
# File 'lib/react_on_rails/prerender_error.rb', line 9 def js_code @js_code end |
#props ⇒ Object (readonly)
TODO: Consider remove providing original err as already have access to self.cause blog.honeybadger.io/nested-errors-in-ruby-with-exception-cause/
9 10 11 |
# File 'lib/react_on_rails/prerender_error.rb', line 9 def props @props end |
Instance Method Details
#raven_context ⇒ Object
29 30 31 |
# File 'lib/react_on_rails/prerender_error.rb', line 29 def raven_context to_error_context end |
#to_error_context ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/react_on_rails/prerender_error.rb', line 33 def to_error_context result = { component_name: component_name, err: err, props: props, js_code: js_code, console_messages: } result.merge!(err.to_error_context) if err.respond_to?(:to_error_context) result end |
#to_honeybadger_context ⇒ Object
25 26 27 |
# File 'lib/react_on_rails/prerender_error.rb', line 25 def to_honeybadger_context to_error_context end |