Closed MattMoradi closed 6 years ago
Hi @matthew17754 Actually there is an API that will kind of allow you to do this. The ExceptionReportGenerator class can be used without showing any dialog.
If you create an instance of this class it can generate the same textual report. And you can also send it via email, without showing any dialog.
It's not quite perfect for your situation, though, because the ExceptionReport
class returned only has a ToString()
on it.
We should modify this return value to an object with all the various properties on it, so you can access them for your own dialog. eg Exceptions/SystemInfo etc
Thank you @PandaWood I'll be sure to check it out. In that case, feel free to close this issue once the object return type has been fully implemented.
I've made a small change - on the master branch - for this (see issue link above).
I added 2 new properties on the ExceptionReport
object that is returned: ReportInfo
and IList<SysInfoResults>
- that covers all info, I think, that's in the report.
Still not in perfectly accessible format but close.
I need to fix a few more issues before releasing this as an update on NuGet, though.
The extended properties on the ExceptionReport object (returned from ExceptionReportGenerator
) are in latest nuget release 2.4.1
I think a better solution for this problem has come about recently. Though I haven't fully tested it
But there is a way to implement your own dialog for ExceptionReporter.NET by implementing
an interface IExceptionReportView
as demonstrated minimally in the WinForms demo class YourCustomReporterView
then implementing the IViewMaker
which basically "news-up" your custom view as demonstrated in the same project in YourCustomViewMaker
This technique is what is used by tests where the IViewMaker is mocked out.
In exactly the same way, you can replace the current view with another.
This should also set us up for a WPF version of the view as well.
I just need to battle-test this idea and find out if there's any issues interacting with the supplied ExceptionReportPresenter
- which you'd need to call to be able to implement ExceptionReporter functionality
I was wondering if there are any plans to include an API to allow implementation of a custom reporter form to match the styling and theme of my application. Just so developers like myself can implement their own custom crash report dialog prompts so that they can maintain look and feel for their entire application similarly.
I see you already have some customization options on the existing reporter forms which is great, but will you be implementing the ability for me to utilize my own custom crash reporter forms instead of your pre-designed ones?