Exception: Geb::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/geb/utilities.rb

Overview

define the main error class

Instance Method Summary collapse

Constructor Details

#initialize(custom_error = "", default_message = "") ⇒ Geb::Error

initialize the error class

Parameters:

  • custom_error (String) (defaults to: "")

    the custom error message

  • default_message (String) (defaults to: "")

    the default error message

Raises:



22
23
24
25
26
27
28
29
30
# File 'lib/geb/utilities.rb', line 22

def initialize(custom_error = "", default_message = "")

  # set the error message
  message = custom_error.empty? ? default_message : "#{custom_error} #{default_message}"

  # call the parent class constructor
  super(message)

end