Exception: Proscenium::Builder::BuildError
- Defined in:
- lib/proscenium/builder.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, error) ⇒ BuildError
constructor
A new instance of BuildError.
Constructor Details
#initialize(path, error) ⇒ BuildError
Returns a new instance of BuildError.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/proscenium/builder.rb', line 47 def initialize(path, error) @path = path @error = JSON.parse(error, strict: true) msg = @error['Text'] msg << ' - ' << @error['Detail'] if @error['Detail'].is_a?(String) if (location = @error['Location']) msg << " at #{location['File']}:#{location['Line']}:#{location['Column']}" end super("Failed to build #{path} - #{msg}") end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
45 46 47 |
# File 'lib/proscenium/builder.rb', line 45 def error @error end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
45 46 47 |
# File 'lib/proscenium/builder.rb', line 45 def path @path end |