Module: Grover::JavaScript

Defined in:
lib/grover/errors.rb

Overview

rubocop:disable Style/Documentation

Constant Summary collapse

Error =
Class.new(::Grover::Error)
UnknownError =
Class.new(Error)
ErrorWithDetails =
Class.new(Error) do
  def initialize(name, error_details)
    super(name)
    @error_details = Grover::Utils.deep_transform_keys_in_object error_details, &:to_sym
  end

  attr_reader :error_details
end
RequestFailedError =
Class.new(ErrorWithDetails)
PageRenderError =
Class.new(ErrorWithDetails)

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object



26
27
28
# File 'lib/grover/errors.rb', line 26

def self.const_missing(name)
  const_set name, Class.new(Error)
end