Sha256: ab2edb7a1320c96fe6f5cf15dc876163c4d0ee2e1e4cafc500d7e360313124fe
Contents?: true
Size: 742 Bytes
Versions: 104
Compression:
Stored size: 742 Bytes
Contents
module ReactOnRails class PrerenderError < RuntimeError # err might be nil if JS caught the error def initialize(component_name: nil, err: nil, props: nil, js_code: nil, console_messages: nil) message = "ERROR in SERVER PRERENDERING\n" if err message << <<-MSG Encountered error: \"#{err}\" MSG backtrace = err.backtrace.join("\n") else backtrace = nil end message << <<-MSG when prerendering #{component_name} with props: #{props} js_code was: #{js_code} MSG if console_messages message << <<-MSG console messages: #{console_messages} MSG end super([message, backtrace].compact.join("\n")) end end end
Version data entries
104 entries across 104 versions & 1 rubygems