Exception: Berkshelf::InvalidSourceURI

Inherits:
BerkshelfError show all
Defined in:
lib/berkshelf/errors.rb

Instance Method Summary collapse

Methods inherited from BerkshelfError

set_status_code

Constructor Details

#initialize(url, reason = nil) ⇒ InvalidSourceURI

Returns a new instance of InvalidSourceURI.


384
385
386
387
# File 'lib/berkshelf/errors.rb', line 384

def initialize(url, reason = nil)
  @url    = url
  @reason = reason
end

Instance Method Details

#to_sObject


389
390
391
392
393
# File 'lib/berkshelf/errors.rb', line 389

def to_s
  msg =  "'#{@url}' is not a valid Berkshelf source URI."
  msg << " #{@reason}." unless @reason.nil?
  msg
end