Exception: Kameleoon::Exception::Initialization
- Inherits:
-
KameleoonError
- Object
- StandardError
- KameleoonError
- Kameleoon::Exception::Initialization
- Defined in:
- lib/kameleoon/exceptions.rb
Overview
SDK could not be initialized: its configuration failed to load or no
initialization result was available within the requested timeout.
The failure which prevented the initialization is available via cause;
it is also reported in the message so a caller which only logs the
message still learns why the SDK is not initialized.
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
The failure which prevented the SDK from loading its configuration.
Instance Method Summary collapse
-
#initialize(site_code, environment, cause) ⇒ Initialization
constructor
A new instance of Initialization.
Constructor Details
#initialize(site_code, environment, cause) ⇒ Initialization
Returns a new instance of Initialization.
82 83 84 85 86 |
# File 'lib/kameleoon/exceptions.rb', line 82 def initialize(site_code, environment, cause) @cause = cause super("SDK is not initialized for siteCode: '#{site_code}', environment: '#{environment}'. " \ "Reason: #{cause.nil? ? 'unknown' : cause.}") end |
Instance Attribute Details
#cause ⇒ Object (readonly)
The failure which prevented the SDK from loading its configuration.
80 81 82 |
# File 'lib/kameleoon/exceptions.rb', line 80 def cause @cause end |