Class: RazorRisk::Razor::Connectivity::Exceptions::ConnectivityException

Inherits:
Core::Diagnostics::Exceptions::RRCSBaseException
  • Object
show all
Includes:
Pantheios
Defined in:
lib/razor_risk/razor/connectivity/exceptions.rb

Overview

Root exception class for RazorRisk::Razor::Connectivity classes / modules

NOTE: this class is abstract

Direct Known Subclasses

Razor3::RazorRequester::Exception

Defined Under Namespace

Modules: ConnectivityException_Constants

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, **options) ⇒ ConnectivityException

Initialises an instance, based on the given message and options

Signature

  • Parameters:
@param message

(::String) the exception message

@param options

(::Hash) options

  • Options: @option :cause:: (::Exception) the cause


82
83
84
85
86
87
88
89
# File 'lib/razor_risk/razor/connectivity/exceptions.rb', line 82

def initialize message, **options

    trace ParamNames[ :message, :options ], message, options

    super message, **options

    @options = {}.merge! options
end

Instance Attribute Details

#options ⇒ Object (readonly)

Returns the value of attribute options.



91
92
93
# File 'lib/razor_risk/razor/connectivity/exceptions.rb', line 91

def options
  @options
end

Class Method Details

.new(*args) ⇒ Object

module ConnectivityException_Constants



62
63
64
65
66
67
68
69
70
# File 'lib/razor_risk/razor/connectivity/exceptions.rb', line 62

def self.new *args

    if ConnectivityException_Constants::ABSTRACT_CLASSES.include?(self.name.split('::')[-1])

        raise NoMethodError, "private method `new' called for #{self}:Class"
    end

    super
end