Sha256: eba1c84abb234d9f7a23231ae908ceb86afe318ab3eefae9df39728ff368be05

Contents?: true

Size: 689 Bytes

Versions: 52

Compression:

Stored size: 689 Bytes

Contents

require "spid/ruby-saml/validation_error"

module Spid
  module Saml
    module ErrorHandling
      attr_accessor :errors

      # Append the cause to the errors array, and based on the value of soft, return false or raise
      # an exception. soft_override is provided as a means of overriding the object's notion of
      # soft for just this invocation.
      def append_error(error_msg, soft_override = nil)
        @errors << error_msg

        unless soft_override.nil? ? soft : soft_override
          raise ValidationError.new(error_msg)
        end

        false
      end

      # Reset the errors array
      def reset_errors!
        @errors = []
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
spid-es-0.0.13 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.12 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.11 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.10 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.9 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.8 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.7 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.6 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.5 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.4 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.3 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.2 lib/spid/ruby-saml/error_handling.rb