Exception: SOCKSError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- SOCKSError
- Defined in:
- lib/socksify.rb
Overview
error class
Direct Known Subclasses
AddressTypeNotSupported, CommandNotSupported, ConnectionRefused, HostUnreachable, NetworkUnreachable, NotAllowed, ServerFailure, TTLExpired
Defined Under Namespace
Classes: AddressTypeNotSupported, CommandNotSupported, ConnectionRefused, HostUnreachable, NetworkUnreachable, NotAllowed, ServerFailure, TTLExpired
Constant Summary collapse
- RESPONSE_CODE_CLASSES =
rubocop:enable Style/Documentation
{ 1 => ServerFailure, 2 => NotAllowed, 3 => NetworkUnreachable, 4 => HostUnreachable, 5 => ConnectionRefused, 6 => TTLExpired, 7 => CommandNotSupported, 8 => AddressTypeNotSupported }.freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(msg) ⇒ SOCKSError
constructor
A new instance of SOCKSError.
Constructor Details
#initialize(msg) ⇒ SOCKSError
Returns a new instance of SOCKSError.
26 27 28 29 |
# File 'lib/socksify.rb', line 26 def initialize(msg) Socksify.debug_error("#{self.class}: #{msg}") super end |
Class Method Details
.for_response_code(code) ⇒ Object
90 91 92 |
# File 'lib/socksify.rb', line 90 def self.for_response_code(code) (resp = RESPONSE_CODE_CLASSES[code]) ? resp : self end |