Sha256: e9959194268dd73d609be31c10722aa3e7dc853a8cad02491f3cbcffe3ef1a90

Contents?: true

Size: 590 Bytes

Versions: 1

Compression:

Stored size: 590 Bytes

Contents

# frozen_string_literal: true

class BCDD::Result
  class Error < ::StandardError
    class NotImplemented < self
    end

    class MissingTypeArgument < self
      def initialize(_arg = nil)
        super('A type (argument) is required to invoke the #on/#on_type method')
      end
    end

    class UnexpectedBlockOutcome < self
      def initialize(arg = nil)
        message =
          "Unexpected outcome: #{arg.inspect}. The block must return this object wrapped by " \
          'BCDD::Result::Success or BCDD::Result::Failure'

        super(message)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bcdd-result-0.1.0 lib/bcdd/result/error.rb