In: |
soap/mapping/registry.rb
|
Parent: | Object |
# File soap/mapping/registry.rb, line 38 def initialize(e) @excn_type_name = Mapping.name2elename(e.class.to_s) @cause = e end
# File soap/mapping/registry.rb, line 43 def to_e if @cause.is_a?(::Exception) @cause.extend(::SOAP::Mapping::MappedException) return @cause end klass = Mapping.class_from_name( Mapping.elename2name(@excn_type_name.to_s)) if klass.nil? raise RuntimeError.new(@cause.message) end unless klass <= ::Exception raise NameError.new end obj = klass.new(@cause.message) obj.extend(::SOAP::Mapping::MappedException) obj end