Exception: Mappum::MappumException
- Defined in:
- lib/mappum/mappum_exception.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#caused_by ⇒ Object
Returns the value of attribute caused_by.
-
#from ⇒ Object
Returns the value of attribute from.
-
#from_name ⇒ Object
Returns the value of attribute from_name.
-
#from_root ⇒ Object
Returns the value of attribute from_root.
-
#mappum_backtrace ⇒ Object
Returns the value of attribute mappum_backtrace.
-
#to ⇒ Object
Returns the value of attribute to.
-
#to_name ⇒ Object
Returns the value of attribute to_name.
-
#to_root ⇒ Object
Returns the value of attribute to_root.
Instance Method Summary collapse
-
#initialize(mess = nil) ⇒ MappumException
constructor
A new instance of MappumException.
- #wrap(map, from, to) ⇒ Object
Constructor Details
#initialize(mess = nil) ⇒ MappumException
Returns a new instance of MappumException.
5 6 7 8 9 10 11 |
# File 'lib/mappum/mappum_exception.rb', line 5 def initialize(mess=nil) super(mess) if mess.kind_of? Exception @caused_by = mess set_backtrace(mess.backtrace) end end |
Instance Attribute Details
#caused_by ⇒ Object
Returns the value of attribute caused_by.
3 4 5 |
# File 'lib/mappum/mappum_exception.rb', line 3 def caused_by @caused_by end |
#from ⇒ Object
Returns the value of attribute from.
3 4 5 |
# File 'lib/mappum/mappum_exception.rb', line 3 def from @from end |
#from_name ⇒ Object
Returns the value of attribute from_name.
3 4 5 |
# File 'lib/mappum/mappum_exception.rb', line 3 def from_name @from_name end |
#from_root ⇒ Object
Returns the value of attribute from_root.
3 4 5 |
# File 'lib/mappum/mappum_exception.rb', line 3 def from_root @from_root end |
#mappum_backtrace ⇒ Object
Returns the value of attribute mappum_backtrace.
3 4 5 |
# File 'lib/mappum/mappum_exception.rb', line 3 def mappum_backtrace @mappum_backtrace end |
#to ⇒ Object
Returns the value of attribute to.
3 4 5 |
# File 'lib/mappum/mappum_exception.rb', line 3 def to @to end |
#to_name ⇒ Object
Returns the value of attribute to_name.
3 4 5 |
# File 'lib/mappum/mappum_exception.rb', line 3 def to_name @to_name end |
#to_root ⇒ Object
Returns the value of attribute to_root.
3 4 5 |
# File 'lib/mappum/mappum_exception.rb', line 3 def to_root @to_root end |
Instance Method Details
#wrap(map, from, to) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mappum/mappum_exception.rb', line 12 def wrap(map, from, to) if map != nil and map != @map #don't store same maps twice @map = map from_suffix, to_suffix = "","" add_to_mappum_backtrace(map) from_suffix = "[]" if map.from.array? add_from_name(map.from.name, from_suffix) to_suffix = "[]" if map.to.array? add_to_name(map.to.name, to_suffix) end @to = to if @to.nil? @from = from if @from.nil? @to_root = to @from_root = from end |