Class ErrorReport
Wraps information about a crash in a serializer-friendly format.
public sealed class ErrorReport
- Inheritance
-
objectErrorReport
- Extension Methods
Properties
Application
Information about the current application.
public required AppInfo Application { get; set; }
Property Value
Comments
Comments about the crash entered by the user.
public string? Comments { get; set; }
Property Value
Exception
Information about the exception that occurred.
public ExceptionInfo? Exception { get; set; }
Property Value
Log
The contents of the Log file.
public string? Log { get; set; }
Property Value
OS
Information about the current operating system.
public required OSInfo OS { get; set; }
Property Value
Methods
Generate(Exception, string)
Generates an error report.
public static ErrorReport Generate(Exception exception, string comments)
Parameters
exceptionExceptionThe exception that occurred.
commentsstringComments about the crash entered by the user.
Returns
SendAsync(Uri)
Sends the error report to a remote server.
[RequiresDynamicCode("XML serialization requires runtime code generation.")]
public Task<string> SendAsync(Uri uri)
Parameters
uriUriThe URI to send the report to.
Returns
- Task<string>
The response from the server, if any. May contain instructions how to mitigate the error.
ShouldReport(Exception)
Determines whether an exception should be reported.
public static bool ShouldReport(Exception exception)
Parameters
exceptionException
Returns
ToXmlStringAnonymized()
Serializes the error report to an XML string, removing user-specific information.
[RequiresDynamicCode("XML serialization requires runtime code generation.")]
public string ToXmlStringAnonymized()