Exception: Ovh::Http2sms::MessageLengthError

Inherits:
Error
  • Object
show all
Defined in:
lib/ovh/http2sms/errors.rb

Overview

Raised when message length exceeds SMS limits

Examples:

raise MessageLengthError.new("Message exceeds GSM encoding limit", encoding: :gsm, length: 161)

Instance Attribute Summary collapse

Attributes inherited from Error

#raw_response, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = "Message length error", encoding: nil, length: nil, max_length: nil, **options) ⇒ MessageLengthError



92
93
94
95
96
97
# File 'lib/ovh/http2sms/errors.rb', line 92

def initialize(message = "Message length error", encoding: nil, length: nil, max_length: nil, **options)
  @encoding = encoding
  @length = length
  @max_length = max_length
  super(message, **options)
end

Instance Attribute Details

#encodingSymbol (readonly)



84
85
86
# File 'lib/ovh/http2sms/errors.rb', line 84

def encoding
  @encoding
end

#lengthInteger (readonly)



87
88
89
# File 'lib/ovh/http2sms/errors.rb', line 87

def length
  @length
end

#max_lengthInteger (readonly)



90
91
92
# File 'lib/ovh/http2sms/errors.rb', line 90

def max_length
  @max_length
end