private void HandleEmsException(object sender, EMSExceptionEventArgs arg)
 {
     if (EMSExceptionHandler != null)
     {
         EMSExceptionHandler(sender, arg);
     }
     else
     {
         logger.Error("No exception handler registered with EmsConnection wrapper class.", arg.Exception);
     }
 }
Exemple #2
0
    public void _HandleException(object sender, EMSExceptionEventArgs arg)
    {
        EMSException e = arg.Exception;

        // print the connection exception status
        Console.WriteLine("Connection Exception: " + e.Message);
        Console.WriteLine(e.StackTrace);
        lock (stateLock) {
            stop = true;
        }
    }
                public static void _HandleException(object sender, EMSExceptionEventArgs arg)
                {
                    EMSException e = arg.Exception;

                    // print the connection exception status

                    Console.WriteLine("\n\n********** On EMSExceptionEvent **********\n\n********** ThreadName:" + Thread.CurrentThread.Name +
                        "\n\n********** Exception Message: " + e.Message + "\n\n********** Sender Object:" + sender.ToString()
                        + "\n\n********** Stacktrace:" + e.StackTrace + "\n\n********** Source:" + e.Source
                         + "\n\n********** TargetSite:" + e.TargetSite
                        );


                }