Exception: Proscenium::Builder::BuildError
- Defined in:
- lib/proscenium/builder.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(error) ⇒ BuildError
constructor
A new instance of BuildError.
Constructor Details
#initialize(error) ⇒ BuildError
Returns a new instance of BuildError.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/proscenium/builder.rb', line 39 def initialize(error) @error = JSON.parse(error, strict: true).deep_transform_keys(&:underscore) 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(msg) end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
37 38 39 |
# File 'lib/proscenium/builder.rb', line 37 def error @error end |