Exception: Pione::Package::InvalidScenario

Inherits:
PackageError
  • Object
show all
Defined in:
lib/pione/package/package-exception.rb

Overview

InvalidScenario raises when the package is something bad.

Instance Method Summary collapse

Constructor Details

#initialize(location, reason) ⇒ InvalidScenario

Returns a new instance of InvalidScenario.



35
36
37
38
# File 'lib/pione/package/package-exception.rb', line 35

def initialize(location, reason)
  @location = location
  @reason = reason
end

Instance Method Details

#argsObject



44
45
46
47
48
49
# File 'lib/pione/package/package-exception.rb', line 44

def args
  {
    :path => @location.path,
    :reason => @reason
  }
end

#messageObject



40
41
42
# File 'lib/pione/package/package-exception.rb', line 40

def message
  "%<path>s is an invalid scenario document: %<reason>s" % args
end