Exception: Lightstreamer::LightstreamerError
- Inherits:
-
StandardError
- Object
- StandardError
- Lightstreamer::LightstreamerError
- Defined in:
- lib/lightstreamer/errors.rb,
lib/lightstreamer/errors.rb
Overview
Base class for all errors raised by this gem.
Direct Known Subclasses
Errors::AuthenticationError, Errors::ClientVersionNotSupportedError, Errors::ConfiguredMaximumServerLoadReachedError, Errors::ConfiguredMaximumSessionsReachedError, Errors::ConnectionError, Errors::IncompatibleSessionError, Errors::InvalidDataAdapterError, Errors::InvalidFieldError, Errors::InvalidItemError, Errors::InvalidItemForFieldsError, Errors::InvalidProgressiveNumberError, Errors::InvalidSelectorError, Errors::LicensedMaximumSessionsReachedError, Errors::MetadataAdapterError, Errors::NewSessionsTemporarilyBlockedError, Errors::RawModeNotAllowedByLicenseError, Errors::SessionEndError, Errors::StreamingNotAvailableError, Errors::SubscriptionsNotAllowedByLicenseError, Errors::SyncError, Errors::TableModificationNotAllowedError, Errors::UnfilteredDispatchingNotAllowedByLicenseError, Errors::UnfilteredDispatchingNotAllowedForItemError, Errors::UnfilteredDispatchingNotSupportedForItemError, Errors::UnknownAdapterSetError, Errors::UnknownTableError, Errors::UnsupportedModeForItemError
Class Method Summary collapse
-
.build(message, code) ⇒ LightstreamerError
Takes a Lightstreamer error message and numeric code and returns an instance of the relevant error class that should be raised in response to the error.
Class Method Details
.build(message, code) ⇒ LightstreamerError
Takes a Lightstreamer error message and numeric code and returns an instance of the relevant error class that should be raised in response to the error.
176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/lightstreamer/errors.rb', line 176 def self.build(, code) code = code.to_i if API_ERROR_CODE_TO_CLASS.key? code API_ERROR_CODE_TO_CLASS[code].new '' elsif code <= 0 Errors::MetadataAdapterError.new , code else new "#{code}: #{message}" end end |