Exemplo n.º 1
0
 public List <VerboseRecord> GetTrace(Guid correlationToken)
 {
     using var client = clientFactory();
     try
     {
         return(client.GetTrace(correlationToken));
     }
     catch (FaultException <RoutineError> ex)
     {
         if (ex.Detail.AdminkaExceptionCode != null)
         {
             var baseException = new AdminkaException(ex.Message, ex, ex.Detail.AdminkaExceptionCode);
             baseException.CopyData(ex.Detail.Data);
             throw baseException;
         }
         else
         {
             ex.CopyData(ex.Detail.Data);
         }
         throw;
     }
 }
Exemplo n.º 2
0
        private static void AppendUserContextException(this StringBuilder stringBuilder, AdminkaException exception)
        {
            var userContextException = exception;

            stringBuilder.AppendMarkdownLine(nameof(AdminkaException) + " specific:");
            stringBuilder.Append("   ").AppendMarkdownProperty("Code", userContextException.Code);
        }