Sha256: 271998f9f7af7ac3425d7c7a1e688f160ee5aefb6408b9ba58213fe9ff2814c4

Contents?: true

Size: 273 Bytes

Versions: 66

Compression:

Stored size: 273 Bytes

Contents

module Services
  class Base
    module ExceptionWrapper
      def call(*args)
        super
      rescue StandardError => e
        if e.class <= self.class::Error
          raise e
        else
          raise self.class::Error, e
        end
      end
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
services-7.3.3 lib/services/modules/exception_wrapper.rb
services-7.3.1 lib/services/modules/exception_wrapper.rb
services-7.3.0 lib/services/modules/exception_wrapper.rb
services-7.2.1 lib/services/modules/exception_wrapper.rb
services-7.2.0 lib/services/modules/exception_wrapper.rb
services-7.1.2 lib/services/modules/exception_wrapper.rb
services-7.1.1 lib/services/modules/exception_wrapper.rb
services-7.1.0 lib/services/modules/exception_wrapper.rb
services-7.0.3 lib/services/modules/exception_wrapper.rb
services-7.0.2 lib/services/modules/exception_wrapper.rb
services-7.0.1 lib/services/modules/exception_wrapper.rb
services-7.0.0 lib/services/modules/exception_wrapper.rb
services-6.0.5 lib/services/modules/exception_wrapper.rb
services-6.0.4 lib/services/modules/exception_wrapper.rb
services-6.0.3 lib/services/modules/exception_wrapper.rb
services-6.0.2 lib/services/modules/exception_wrapper.rb
services-6.0.1 lib/services/modules/exception_wrapper.rb
services-6.0.0 lib/services/modules/exception_wrapper.rb
services-5.1.2 lib/services/modules/exception_wrapper.rb
services-5.1.1 lib/services/modules/exception_wrapper.rb