6 namespace SiliconStudio.Core.Diagnostics
27 if (exception == null)
throw new ArgumentNullException(
"exception");
28 Message = exception.Message;
29 StackTrace = exception.StackTrace;
30 TypeFullName = exception.GetType().FullName;
31 TypeName = exception.GetType().Name;
32 InnerException = exception.InnerException != null ?
new ExceptionInfo(exception.InnerException) : null;
38 public string Message {
get; set; }
43 public string StackTrace {
get; set; }
48 public string TypeFullName {
get; set; }
53 public string TypeName {
get; set; }
63 var sb =
new StringBuilder();
64 sb.AppendLine(Message);
65 if (StackTrace != null)
66 sb.AppendLine(StackTrace);
67 if (InnerException != null)
68 sb.AppendFormat(
"Inner exception: {0}{1}", InnerException, Environment.NewLine);
override string ToString()
ExceptionInfo()
Initializes a new instance of the ExceptionInfo class with default values for its properties ...
ExceptionInfo(Exception exception)
Initializes a new instance of the ExceptionInfo class from an Exception.
This class is used to store some properties of an exception. It is serializable.