Exception: Phocoder::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Phocoder::Error
- Defined in:
- lib/phocoder/errors.rb
Direct Known Subclasses
Instance Method Summary collapse
- #backtrace ⇒ Object
-
#initialize(error_or_message) ⇒ Error
constructor
A new instance of Error.
- #inspect ⇒ Object
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(error_or_message) ⇒ Error
Returns a new instance of Error.
4 5 6 7 8 9 10 |
# File 'lib/phocoder/errors.rb', line 4 def initialize() if .is_a?(Exception) @error = else @message = end end |
Instance Method Details
#backtrace ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/phocoder/errors.rb', line 16 def backtrace if @error @error.backtrace else super end end |
#inspect ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/phocoder/errors.rb', line 24 def inspect if @error "#{@error.inspect} (wrapped in a #{self.class})" else super end end |
#message ⇒ Object
12 13 14 |
# File 'lib/phocoder/errors.rb', line 12 def @message || "#{@error.class} (wrapped in a #{self.class}) - #{@error.}" end |
#to_s ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/phocoder/errors.rb', line 32 def to_s if @error "#{@error.class} (wrapped in a #{self.class}) - #{@error}" else super end end |