Exception: React::ServerRendering::PrerenderError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/react/server_rendering.rb

Overview

Raised when something went wrong during server rendering.

Instance Method Summary collapse

Constructor Details

#initialize(component_name, props, js_message) ⇒ PrerenderError

Returns a new instance of PrerenderError.



38
39
40
41
42
# File 'lib/react/server_rendering.rb', line 38

def initialize(component_name, props, js_message)
  message = ["Encountered error \"#{js_message.inspect}\" when prerendering #{component_name} with #{props}",
              js_message.backtrace.join("\n")].join("\n")
  super(message)
end