Exception: Ferrum::InvalidScreenshotFormatError

Inherits:
Error
  • Object
show all
Defined in:
lib/ferrum/errors.rb,
sig/ferrum/errors.rbs

Overview

Raised when the :format option passed to a screenshot call is not one of the supported formats.

Instance Method Summary collapse

Constructor Details

#initialize(format) ⇒ InvalidScreenshotFormatError

Returns a new instance of InvalidScreenshotFormatError.

Parameters:

  • format (String)


229
230
231
232
# File 'lib/ferrum/errors.rb', line 229

def initialize(format)
  valid_formats = Page::Screenshot::SUPPORTED_SCREENSHOT_FORMAT.join(" | ")
  super("Invalid value #{format} for option `:format` (#{valid_formats})")
end