Sha256: b95ea8123d9ee598fd2064ec261a13c11d2ac5a23253c4f51a6b25f4d311393b

Contents?: true

Size: 689 Bytes

Versions: 10

Compression:

Stored size: 689 Bytes

Contents

require "ciam/ruby-saml/validation_error"

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

10 entries across 10 versions & 1 rubygems

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