Exception: Aspera::Transfer::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Aspera::Transfer::Error
- Defined in:
- lib/aspera/transfer/error.rb
Overview
error raised if transfer fails
Instance Attribute Summary collapse
-
#err_code ⇒ Object
readonly
Returns the value of attribute err_code.
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(message, err_code = nil) ⇒ Error
constructor
A new instance of Error.
- #retryable? ⇒ Boolean
Constructor Details
#initialize(message, err_code = nil) ⇒ Error
Returns a new instance of Error.
11 12 13 14 |
# File 'lib/aspera/transfer/error.rb', line 11 def initialize(, err_code=nil) super() @err_code = err_code end |
Instance Attribute Details
#err_code ⇒ Object (readonly)
Returns the value of attribute err_code.
9 10 11 |
# File 'lib/aspera/transfer/error.rb', line 9 def err_code @err_code end |
Instance Method Details
#info ⇒ Object
16 17 18 19 |
# File 'lib/aspera/transfer/error.rb', line 16 def info r = ERROR_INFO[@err_code] || {r: false, c: 'UNKNOWN', m: 'unknown', a: 'unknown'} return r.merge({i: @err_code}) end |
#retryable? ⇒ Boolean
21 |
# File 'lib/aspera/transfer/error.rb', line 21 def retryable?; info[:r]; end |