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.53 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.52 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.51 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.50 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.49 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.48 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.47 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.46 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.45 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.44 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.43 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.42 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.41 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.40 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.39 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.38 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.37 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.36 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.35 lib/spid/ruby-saml/error_handling.rb
spid-es-0.0.34 lib/spid/ruby-saml/error_handling.rb