Sha256: 692094e16e0965e025aa8c88cdcc81852d18f1ea5f59a40e24034fe170a85879

Contents?: true

Size: 688 Bytes

Versions: 3

Compression:

Stored size: 688 Bytes

Contents

module Transproc
  Error = Class.new(StandardError)
  FunctionAlreadyRegisteredError = Class.new(Error)

  class FunctionNotFoundError < Error
    def initialize(function, source = nil)
      return super "No registered function #{source}[:#{function}]" if source
      super "No globally registered function for #{function}"
    end
  end

  class MalformedInputError < Error
    attr_reader :function, :value, :original_error

    def initialize(function, value, error)
      @function = function
      @value = value
      @original_error = error
      super "Failed to call_function #{function} with #{value.inspect} - #{error}"
      set_backtrace(error.backtrace)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
transproc-0.3.2 lib/transproc/error.rb
transproc-0.3.1 lib/transproc/error.rb
transproc-0.3.0 lib/transproc/error.rb