Sha256: ef88885e4c823bddd44ddf6da4ddbf954c6cd8dabcb36804a542c1c201a17da4
Contents?: true
Size: 656 Bytes
Versions: 24
Compression:
Stored size: 656 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: :error_handler, 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
24 entries across 24 versions & 1 rubygems