Exception: Lightstreamer::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Lightstreamer::Error
- Defined in:
- lib/lightstreamer/errors.rb,
lib/lightstreamer/errors.rb
Overview
Base class for all errors raised by this gem.
Direct Known Subclasses
AuthenticationError, ClientVersionNotSupportedError, ConfiguredMaximumServerLoadReachedError, ConfiguredMaximumSessionsReachedError, IncompatibleSessionError, InvalidDataAdapterError, InvalidFieldError, InvalidItemError, InvalidItemForFieldsError, InvalidProgressiveNumberError, InvalidSelectorError, LicensedMaximumSessionsReachedError, MetadataAdapterError, NewSessionsTemporarilyBlockedError, RawModeNotAllowedByLicenseError, RequestError, SessionEndError, StreamingNotAvailableError, SubscriptionsNotAllowedByLicenseError, SyncError, TableModificationNotAllowedError, UnfilteredDispatchingNotAllowedByLicenseError, UnfilteredDispatchingNotAllowedForItemError, UnfilteredDispatchingNotSupportedForItemError, UnknownAdapterSetError, UnknownTableError, UnsupportedModeForItemError
Class Method Summary collapse
-
.build(message, code) ⇒ Error
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) ⇒ Error
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.
165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/lightstreamer/errors.rb', line 165 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 MetadataAdapterError.new , code else new end end |