Exception: AnnotationSecurity::RuleExecutionError

Inherits:
RuleError show all
Defined in:
lib/annotation_security/exceptions.rb

Overview

AnnotationSecurity::RuleExecutionError

Will be raised if an error occured while evaluation a right or relation.

Instance Method Summary collapse

Methods inherited from RuleError

defined_twice, forbidden_name

Constructor Details

#initialize(rule, proc = false, ex = nil) ⇒ RuleExecutionError

:nodoc:



85
86
87
88
89
90
91
92
93
# File 'lib/annotation_security/exceptions.rb', line 85

def initialize(rule, proc=false, ex = nil) # :nodoc:
  if ex
    log_backtrace(proc,ex)
    super("An error occured while evaluating #{rule}: \n" +
          ex.class.name + ": " + ex.message)
  else
    super("An error occured while evaluating #{rule}")
  end
end

Instance Method Details

#set_backtrace(array) ⇒ Object

:nodoc:



95
96
97
# File 'lib/annotation_security/exceptions.rb', line 95

def set_backtrace(array) # :nodoc:
  super((@bt || []) + array[1..-1])
end