Exception: Collatz::FailedSaneParameterCheck

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

Overview

Thrown when either p, the modulus, or a, the multiplicand, are zero.

Instance Method Summary collapse

Constructor Details

#initialize(msg = "This is a custom exception", exception_type = "FailedSaneParameterCheck") ⇒ FailedSaneParameterCheck

Construct a FailedSaneParameterCheck with a message associated with the provided enum.

Parameters:

  • msg (String) (defaults to: "This is a custom exception")

    One of the SaneParameterErrMsg strings.



39
40
41
42
# File 'lib/collatz/utilities.rb', line 39

def initialize(msg = "This is a custom exception", exception_type = "FailedSaneParameterCheck")
  @exception_type = exception_type
  super(msg)
end