Exception: Berkshelf::InvalidSourceURI
- Inherits:
-
BerkshelfError
- Object
- StandardError
- BerkshelfError
- Berkshelf::InvalidSourceURI
- Defined in:
- lib/berkshelf/errors.rb
Instance Method Summary collapse
-
#initialize(url, reason = nil) ⇒ InvalidSourceURI
constructor
A new instance of InvalidSourceURI.
- #to_s ⇒ Object
Methods inherited from BerkshelfError
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_s ⇒ Object
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 |