|
|
@ -1,4 +1,7 @@ |
|
|
using System; |
|
|
using System; |
|
|
|
|
|
using System.Reflection; |
|
|
|
|
|
using System.Runtime.ExceptionServices; |
|
|
|
|
|
using System.Xml; |
|
|
|
|
|
|
|
|
namespace Avalonia.Remote.Protocol.Designer |
|
|
namespace Avalonia.Remote.Protocol.Designer |
|
|
{ |
|
|
{ |
|
|
@ -26,6 +29,27 @@ namespace Avalonia.Remote.Protocol.Designer |
|
|
|
|
|
|
|
|
public class ExceptionDetails |
|
|
public class ExceptionDetails |
|
|
{ |
|
|
{ |
|
|
|
|
|
public ExceptionDetails() |
|
|
|
|
|
{ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ExceptionDetails(Exception e) |
|
|
|
|
|
{ |
|
|
|
|
|
if (e is TargetInvocationException) |
|
|
|
|
|
{ |
|
|
|
|
|
e = e.InnerException; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExceptionType = e.GetType().Name; |
|
|
|
|
|
Message = e.Message; |
|
|
|
|
|
|
|
|
|
|
|
if (e is XmlException xml) |
|
|
|
|
|
{ |
|
|
|
|
|
LineNumber = xml.LineNumber; |
|
|
|
|
|
LinePosition = xml.LinePosition; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public string ExceptionType { get; set; } |
|
|
public string ExceptionType { get; set; } |
|
|
public string Message { get; set; } |
|
|
public string Message { get; set; } |
|
|
public int? LineNumber { get; set; } |
|
|
public int? LineNumber { get; set; } |
|
|
|