Exception: MusicUtils::StdError

Inherits:
StandardError
  • Object
show all
Extended by:
Error
Defined in:
lib/music-utils/errors/std_error.rb

Overview

Prevents the user of the library from rescuing the global ‘StandardError`.

Direct Known Subclasses

InvalidInterval, InvalidNote

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, original = $!) ⇒ StdError

Create the error with a message and an original that defaults to the exception that is currently active, in this thread, if one exists



11
12
13
14
# File 'lib/music-utils/errors/std_error.rb', line 11

def initialize(msg, original=$!)
  super(msg)
  @original = original;
end

Instance Attribute Details

#originalObject (readonly)

Returns the value of attribute original.



7
8
9
# File 'lib/music-utils/errors/std_error.rb', line 7

def original
  @original
end