Error reporting with Silverlight
Published 31 December 2012
Silverlight support deprecated
Due to deprecation by Microsoft, Silverlight support was removed in SmartAssembly 6.11.2.
Automatic error reporting
Automatic error reporting works for Silverlight applications in the same way as for other types of application (see Setting up error reporting).
Manual error reporting
If you want to report an error manually, first try referencing SmartAssembly.ReportException.dll (see Error reporting and DLLs, method 1).
If that does not work, you need to add the following code to your application to report a particular exception manually:
[AttributeUsage(AttributeTargets.Method)] private sealed class ReportExceptionAttribute : Attribute { } [ReportException] private static void Report(Exception exception) { throw new Exception("{report}", exception); }
Wherever an exception is raised that you want to report, call the Report()
method, passing the exception to it.