예제 #1
0
 protected override void OnScopeException(ScopeExceptionEventArg e)
 {
     base.OnScopeException(e);
     if (!string.IsNullOrEmpty(Message))
     {
         Console.WriteLine(">LOG --- Exception caught: {0}, Type: {1}  ---", Message, e.Exception.GetType().Name);
     }
 }
예제 #2
0
 protected virtual void Call() {
     if (code != null) {
         try {
             code(null);
         } catch (Exception ex) {
             ScopeExceptionEventArg e = new ScopeExceptionEventArg { Exception = ex };
             OnScopeException(e);
             if (!e.Handled)
                 throw ex;
         } finally {
             code = null;
         }
     }
 }
예제 #3
0
 protected virtual void OnScopeException(ScopeExceptionEventArg e) {
     EventHandler<ScopeExceptionEventArg> handler = ScopeException;
     if (handler != null)
         handler(this, e);
 }