Beispiel #1
0
        /// <summary> Call the method MethodException()
        ///
        /// </summary>
        /// <param name="handler">call the appropriate method on this handler
        /// </param>
        /// <exception cref="Exception">generic exception thrown by MethodException event handler method call
        /// </exception>
        public virtual void Execute(IEventHandler handler)
        {
            IMethodExceptionEventHandler eh = (IMethodExceptionEventHandler)handler;

            if (eh is IContextAware)
            {
                ((IContextAware)eh).Context = context;
            }

            executed = true;
            result   = ((IMethodExceptionEventHandler)handler).MethodException(claz, method, e);
        }
Beispiel #2
0
 /// <summary>  Add a method exception event handler to the Cartridge.
 ///
 /// </summary>
 /// <param name="ev">IMethodExceptionEventHandler
 /// </param>
 /// <since> 1.5
 /// </since>
 public virtual void AddMethodExceptionHandler(IMethodExceptionEventHandler ev)
 {
     methodExceptionHandlers.Add(ev);
 }