Sha256: 03fadf07733e66dbf42e5b97b3edeb39121ba92720d782ff2b9bd8c7ebfa431c
Contents?: true
Size: 652 Bytes
Versions: 26
Compression:
Stored size: 652 Bytes
Contents
module Eco module API class Error class Handlers < Eco::API::UseCases def add(handler) raise "Expected Eco::API::Error::Handler object. Given: #{policy}" unless handler.is_a?(Eco::API::Error::Handler) super(handler) end def on(klass_err, type: :transform, retry: true, &block) Eco::API::Error.validate_err_class(klass_err) raise "Expected block but not given" unless block Eco::API::Error::Handler.new(klass_err, type: type, root: self, &block).tap do |handler| add(handler) end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems