Sha256: 102ebae81e432867d008f96e90fbe35c821dc2e006fe413756da9a826fb03678

Contents?: true

Size: 994 Bytes

Versions: 30

Compression:

Stored size: 994 Bytes

Contents

require 'test/unit'
require 'soap/soap'


module SOAP


class TestNestedException < Test::Unit::TestCase
  class MyError < SOAP::Error; end

  def foo
    begin
      bar
    rescue
      raise MyError.new("foo", $!)
    end
  end

  def bar
    begin
      baz
    rescue
      raise MyError.new("bar", $!)
    end
  end

  def baz
    raise MyError.new("baz", $!)
  end

  def test_nestedexception
    begin
      foo
    rescue MyError => e
      trace = e.backtrace.find_all { |line| /test\/unit/ !~ line && /\d\z/ !~ line }
      trace = trace.map { |line| line.sub(/\A[^:]*/, '') }
      assert_equal(TOBE, trace)
    end
  end

  TOBE = [
    ":15:in `foo'",
    ":33:in `test_nestedexception'",
    ":23:in `bar': bar (SOAP::TestNestedException::MyError) [NESTED]",
    ":13:in `foo'",
    ":33:in `test_nestedexception'",
    ":28:in `baz': baz (SOAP::TestNestedException::MyError) [NESTED]",
    ":21:in `bar'",
    ":13:in `foo'",
    ":33:in `test_nestedexception'",
  ]

end


end

Version data entries

30 entries across 30 versions & 13 rubygems

Version Path
mumboe-soap4r-1.6.0.pre.beta test/soap/test_nestedexception.rb
DefV-soap4r-1.5.8.2 test/soap/test_nestedexception.rb
mumboe-soap4r-1.5.8.7 test/soap/test_nestedexception.rb
teo-soap4r-1.5.9b test/soap/test_nestedexception.rb
mumboe-soap4r-1.5.8.6 test/soap/test_nestedexception.rb
soap4r-spox-1.6.0 test/soap/test_nestedexception.rb
soap4r-r19-1.5.9 test/soap/test_nestedexception.rb
mumboe-soap4r-1.5.8.5 test/soap/test_nestedexception.rb
soap4r-ruby1.9-2.0.5 test/soap/test_nestedexception.rb
soap4r-sgonyea-1.6.0 test/soap/test_nestedexception.rb
soap4r-straightjacket-1.5.9 test/soap/test_nestedexception.rb
soap4r-straightjacket-1.5.8 test/soap/test_nestedexception.rb
soap4r-ruby1.9-2.0.3 test/soap/test_nestedexception.rb
soap4r-ruby1.9-2.0.2 test/soap/test_nestedexception.rb
soap4r-ruby1.9-2.0.1 test/soap/test_nestedexception.rb
mumboe-soap4r-1.5.8.4 test/soap/test_nestedexception.rb
soap4r-ruby1.9-2.0.0 test/soap/test_nestedexception.rb
hands-soap4r-1.5.8.4 test/soap/test_nestedexception.rb
soap4r-ruby1.9-1.0.0 test/soap/test_nestedexception.rb
snaury-soap4r-1.5.8.1 test/soap/test_nestedexception.rb