Ejemplo n.º 1
0
 public void ReportFromCatch()
 {
     try
     {
         var a = 10;
         var b = 0;
         var c = a / b;
     }
     catch (System.Exception ex)
     {
         using (IRollbar logger = RollbarFactory.CreateNew().Configure(this._loggerConfig))
         {
             try
             {
                 this.ExpectedCommunicationEventsTotal++;
                 //TODO: implement and add SynchronousPackage around the payload object!!!
                 logger.Error(new System.Exception("outer exception", ex));
             }
             catch
             {
                 Assert.Fail();
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void ReportException()
 {
     using (IRollbar logger = RollbarFactory.CreateNew().Configure(this._loggerConfig))
     {
         try
         {
             logger.Error(new System.Exception("test exception"));
         }
         catch
         {
             Assert.IsTrue(false);
         }
     }
 }
Ejemplo n.º 3
0
 public void ReportException()
 {
     using (IRollbar logger = RollbarFactory.CreateNew().Configure(this._loggerConfig))
     {
         try
         {
             this.ExpectedCommunicationEventsTotal++;
             //TODO: implement and add SynchronousPackage around the payload object!!!
             logger.Error(new System.Exception("test exception"));
         }
         catch
         {
             Assert.Fail("the execution should not reach here!");
         }
     }
 }
 public void ReportFromCatch()
 {
     try
     {
         var a = 10;
         var b = 0;
         var c = a / b;
     }
     catch (System.Exception ex)
     {
         try
         {
             _logger.Error(new System.Exception("outer exception", ex));
         }
         catch
         {
             Assert.IsTrue(false);
         }
     }
 }
Ejemplo n.º 5
0
 public void ReportFromCatch()
 {
     try
     {
         var a = 10;
         var b = 0;
         var c = a / b;
     }
     catch (System.Exception ex)
     {
         using (IRollbar logger = RollbarFactory.CreateNew().Configure(this._loggerConfig))
         {
             try
             {
                 logger.Error(new System.Exception("outer exception", ex));
             }
             catch
             {
                 Assert.Fail();
             }
         }
     }
 }