Exception: Sprinkle::Errors::TransferFailure

Inherits:
PrettyFailure show all
Defined in:
lib/sprinkle/errors/transfer_failure.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from PrettyFailure

#details

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PrettyFailure

#boxed, #initialize, #log

Constructor Details

This class inherits a constructor from Sprinkle::Errors::PrettyFailure

Class Method Details

.no_permission(installer, e) ⇒ Object



6
7
8
9
10
# File 'lib/sprinkle/errors/transfer_failure.rb', line 6

def self.no_permission(installer,e)
  tf=TransferFailure.new(installer, {}, e)
  tf.details[:error]=e.message
  tf
end

Instance Method Details



12
13
14
15
16
17
18
19
# File 'lib/sprinkle/errors/transfer_failure.rb', line 12

def print_summary
  summary
  # log "Command", @details[:command]
  log "ERROR", @details[:error]
  if details[:error] =~ /Permission denied/
    log "HINTS", "You may want to try passing the :sudo option to transfer."
  end
end

#summaryObject



21
22
23
# File 'lib/sprinkle/errors/transfer_failure.rb', line 21

def summary
  boxed("Package '#{@installer.package.name}' could not transfer #{@installer.source}")
end