Exception: ContractErrors::ContractError
- Inherits:
-
StandardError
- Object
- StandardError
- ContractErrors::ContractError
- Defined in:
- lib/0xfacet/typed/contract_errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#contract ⇒ Object
Returns the value of attribute contract.
-
#error_status ⇒ Object
Returns the value of attribute error_status.
Instance Method Summary collapse
-
#initialize(message, contract = nil) ⇒ ContractError
constructor
A new instance of ContractError.
- #message ⇒ Object
Constructor Details
#initialize(message, contract = nil) ⇒ ContractError
Returns a new instance of ContractError.
6 7 8 9 |
# File 'lib/0xfacet/typed/contract_errors.rb', line 6 def initialize(, contract = nil) super() @contract = contract end |
Instance Attribute Details
#contract ⇒ Object
Returns the value of attribute contract.
3 4 5 |
# File 'lib/0xfacet/typed/contract_errors.rb', line 3 def contract @contract end |
#error_status ⇒ Object
Returns the value of attribute error_status.
4 5 6 |
# File 'lib/0xfacet/typed/contract_errors.rb', line 4 def error_status @error_status end |
Instance Method Details
#message ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/0xfacet/typed/contract_errors.rb', line 11 def return super if contract.blank? trace = !Rails.env.production? ? backtrace.join("\n") : '' "#{contract.class.name} error: " + super end |