Exception: Net::IMAP::ResponseTooLargeError
- Inherits:
-
ResponseReadError
- Object
- StandardError
- Error
- ResponseReadError
- Net::IMAP::ResponseTooLargeError
- Defined in:
- lib/net/imap/errors.rb
Overview
Error raised when a response is larger than IMAP#max_response_size.
Instance Attribute Summary collapse
-
#bytes_read ⇒ Object
readonly
Returns the value of attribute bytes_read.
-
#literal_size ⇒ Object
readonly
Returns the value of attribute literal_size.
-
#max_response_size ⇒ Object
readonly
Returns the value of attribute max_response_size.
Instance Method Summary collapse
-
#initialize(msg = nil, *args, bytes_read: nil, literal_size: nil, max_response_size: nil, **kwargs) ⇒ ResponseTooLargeError
constructor
A new instance of ResponseTooLargeError.
Constructor Details
#initialize(msg = nil, *args, bytes_read: nil, literal_size: nil, max_response_size: nil, **kwargs) ⇒ ResponseTooLargeError
Returns a new instance of ResponseTooLargeError.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/net/imap/errors.rb', line 29 def initialize(msg = nil, *args, bytes_read: nil, literal_size: nil, max_response_size: nil, **kwargs) @bytes_read = bytes_read @literal_size = literal_size @max_response_size = max_response_size msg ||= [ "Response size", response_size_msg, "exceeds max_response_size", max_response_size && "(#{max_response_size}B)", ].compact.join(" ") super(msg, *args, **kwargs) end |
Instance Attribute Details
#bytes_read ⇒ Object (readonly)
Returns the value of attribute bytes_read.
26 27 28 |
# File 'lib/net/imap/errors.rb', line 26 def bytes_read @bytes_read end |
#literal_size ⇒ Object (readonly)
Returns the value of attribute literal_size.
26 27 28 |
# File 'lib/net/imap/errors.rb', line 26 def literal_size @literal_size end |
#max_response_size ⇒ Object (readonly)
Returns the value of attribute max_response_size.
27 28 29 |
# File 'lib/net/imap/errors.rb', line 27 def max_response_size @max_response_size end |