Sha256: eb32a53fdb403e12f1b1a5f87b887ec1ba45321d4259ee81076b90ee3c8328c9

Contents?: true

Size: 483 Bytes

Versions: 3

Compression:

Stored size: 483 Bytes

Contents

# frozen_string_literal: true

module LedgerSync
  class Error
    class SyncError < Error
      attr_reader :sync

      def initialize(message:, sync:)
        @sync = sync
        super(message: message)
      end

      class NotPerformedError < self
        def initialize(message: nil, sync:)
          message ||= 'Sync has not been performed.  Call perform before retrieving the result.'

          super(message: message, sync: sync)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.1.1 lib/ledger_sync/error/sync_errors.rb
ledger_sync-1.0.10 lib/ledger_sync/error/sync_errors.rb
ledger_sync-1.0.9 lib/ledger_sync/error/sync_errors.rb