Beispiel #1
0
 /// <summary>
 /// Initialize JException object using the provided Exception
 /// </summary>
 /// <param name="e"></param>
 public JException(Exception e)
 {
     ParameterType = new JTypeInfo(e.GetType());
     Message       = e.Message;
     if (e.InnerException != null)
     {
         JInnerException = new JException(e.InnerException);
     }
 }
Beispiel #2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Exception was thrown by the target remote machine:");
            JException currentException = this;

            do
            {
                sb.AppendLine($"{currentException.ParameterType.FullName} : {currentException.Message}");
                currentException = currentException.JInnerException;
            }while (currentException != null);
            return(sb.ToString());
        }