lib/surrounded/context_errors.rb in surrounded-0.9.4 vs lib/surrounded/context_errors.rb in surrounded-0.9.5

- old
+ new

@@ -1,8 +1,16 @@ require 'triad' module Surrounded module Context class InvalidRole < ::Triad::ItemNotPresent; end - module InvalidRoleType; end + class InvalidRoleType < ::StandardError + unless method_defined?(:cause) + def initialize(msg=nil) + super + @cause = $! + end + attr_reader :cause + end + end class AccessError < ::StandardError; end end end \ No newline at end of file