Sha256: d1ec186835b44ff38a6baf759cf65f1f20819e2fe1cb900fc905a3d38c2b0ec1

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

module Restorm
  module Errors
    class PathError < StandardError

      attr_reader :missing_parameter

      def initialize(message, missing_parameter = nil)
        super(message)
        @missing_parameter = missing_parameter
      end
    end

    class AssociationUnknownError < StandardError
    end

    class ParseError < StandardError
    end

    class ResourceInvalid < StandardError

      attr_reader :resource
      def initialize(resource)
        @resource = resource
        errors = @resource.response_errors.join(", ")
        super("Remote validation failed: #{errors}")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restorm-1.0.0 lib/restorm/errors.rb