Module: PacketGen::Header::SCTP::ErrorMixin
- Includes:
- Padded32
- Included in:
- CookieReceivedWhileShuttingDownError, Error, InvalidMandatoryParameterError, InvalidStreamIdError, MissingMandatoryParameterError, NoUserDataError, OutOfResourceError, ProtocolViolationError, RestartAssociationWithNewAddressError, StaleCookieError, UnrecognizedChunkTypeError, UnrecognizedParametersError, UnresolvableAddressError, UserInitiatedAbortError
- Defined in:
- lib/packetgen/header/sctp/error.rb
Overview
Common methods to all error causes
Instance Method Summary collapse
-
#error_name ⇒ String
Get error name.
- #to_human ⇒ String
Methods included from Padded32
Instance Method Details
#error_name ⇒ String
Get error name
19 20 21 |
# File 'lib/packetgen/header/sctp/error.rb', line 19 def error_name self.class.name.split('::').last.delete_suffix('Error') end |
#to_human ⇒ String
24 25 26 |
# File 'lib/packetgen/header/sctp/error.rb', line 24 def to_human "<#{error_name}: #{value}>" end |