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

Version Path
react_on_rails-6.2.1.rc.2 lib/react_on_rails/prerender_error.rb
react_on_rails-6.2.1.rc.1 lib/react_on_rails/prerender_error.rb
react_on_rails-6.2.0 lib/react_on_rails/prerender_error.rb
react_on_rails-6.1.2 lib/react_on_rails/prerender_error.rb
react_on_rails-6.1.1 lib/react_on_rails/prerender_error.rb
react_on_rails-6.1.1.rc.1 lib/react_on_rails/prerender_error.rb
react_on_rails-6.1.0 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.5 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.4 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.3 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.2 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.1 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.0 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.0.rc.6 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.0.rc.5 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.0.rc.4 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.0.rc3 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.0.rc.2 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.0.rc.1 lib/react_on_rails/prerender_error.rb
react_on_rails-6.0.0.beta.5 lib/react_on_rails/prerender_error.rb