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.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/proscenium/builder.rb', line 48 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.
46 47 48 |
# File 'lib/proscenium/builder.rb', line 46 def error @error end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
46 47 48 |
# File 'lib/proscenium/builder.rb', line 46 def path @path end |