Sha256: fc592b7326d6518b88811a647fa623e1302d6ba62412631b2245648545c41f01

Contents?: true

Size: 701 Bytes

Versions: 31

Compression:

Stored size: 701 Bytes

Contents

require "onelogin/ruby-saml/validation_error"

module OneLogin
  module RubySaml
    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

31 entries across 31 versions & 1 rubygems

Version Path
ruby-saml-1.12.4 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.18.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.17.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.12.3 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.16.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.15.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.14.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.13.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.12.2 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.12.1 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.12.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.11.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.10.2 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.10.1 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.10.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.9.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.8.0 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.7.2 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.7.1 lib/onelogin/ruby-saml/error_handling.rb
ruby-saml-1.6.2 lib/onelogin/ruby-saml/error_handling.rb