Exception: Aspera::Fasp::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Aspera::Fasp::Error
- Defined in:
- lib/aspera/fasp/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.
8 9 10 11 |
# File 'lib/aspera/fasp/error.rb', line 8 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.
7 8 9 |
# File 'lib/aspera/fasp/error.rb', line 7 def err_code @err_code end |
Instance Method Details
#info ⇒ Object
13 14 15 16 |
# File 'lib/aspera/fasp/error.rb', line 13 def info r=Fasp::ERROR_INFO[@err_code] || {r: false , c: 'UNKNOWN', m: 'unknown', a: 'unknown'} return r.merge({i: @err_code}) end |
#retryable? ⇒ Boolean
18 |
# File 'lib/aspera/fasp/error.rb', line 18 def retryable?; info[:r];end |