Sha256: 733905ebcde54ad5aeb2a179dec9698c1969d41b7aee7cf15f8107feaf5c2f52

Contents?: true

Size: 687 Bytes

Versions: 11

Compression:

Stored size: 687 Bytes

Contents

require "cie/ruby-saml/validation_error"

module Cie
  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

11 entries across 11 versions & 1 rubygems

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