{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"Configure Crash Reporting","type":"basic","slug":"add-crash-report","excerpt":"","body":"1. Take the steps described in [Integrate DevMateKit](doc:integrate-devmatekit) if you haven't done it yet.\n2. You can specify additional `DMFrameworkSettings` properties if needed. DevMate Crash Report provides the following configuration options:\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Property\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-0\": \"`IsBeta`\",\n \"1-0\": \"`ApplicationSettings`\",\n \"2-0\": \"`AdditionalInfromation`\",\n \"3-0\": \"`ApplicationIcon`\",\n \"4-0\": \"`LogFilePath`\",\n \"5-0\": \"`Logs`\",\n \"5-1\": \"string\",\n \"4-1\": \"string\",\n \"3-1\": \"string\",\n \"2-1\": \"string\",\n \"1-1\": \"Dictionary<string,object>\",\n \"0-1\": \"bool\",\n \"0-2\": \"Specifies whether a current version of the application is Beta.\",\n \"1-2\": \"Application settings that must be sent with the report data.\",\n \"2-2\": \"Additional information that must be sent with the report data.\",\n \"3-2\": \"Sets a “TitleBar” icon for DevMate Framework windows. Must contain at least one 16x16pt icon. Example: *pack://application:,,,/TestApp;component/icon.ico*.\",\n \"4-2\": \"Path to a log file (if there is a number of log files, it sends only the recently used). If a value is null or empty, or file does not exist, then the Framework tries to load a file from the `Logs` property.\",\n \"5-2\": \"Used to set up specific logs if a `LogFilePath` value is null or empty. If a value is null or empty, an empty string is sent to the server.\"\n },\n \"cols\": 3,\n \"rows\": 6\n}\n[/block]\nFor example:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"DMFeedbackFrameworkSettings.ApplicationSettings.Add(\\\"Setting1\\\", \\\"Value1\\\"); \\nDMFeedbackFrameworkSettings.ApplicationSettings.Add(\\\"Language\\\", \\\"en\\\"); \\nDMFeedbackFrameworkSettings.ApplicationSettings.Add(\\\"AppRunCount\\\", 0); \\nDMFeedbackFrameworkSettings.ApplicationSettings.Add(\\\"Setting2\\\", \\\"Value2\\\"); \\n\\nDMFeedbackFrameworkSettings.LogFilePath = :::at:::\\\"C:\\\\Program Files\\\\AppName\\\\Logs\\\\logfile.log\\\";\\nDMFeedbackFrameworkSettings.AdditionalInformation = \\\"Version with hidden feature\\\";\",\n \"language\": \"csharp\"\n }\n ]\n}\n[/block]\n#Crashes\nThis report type is generally used to notify about unhandled exceptions.\nTo subscribe for unhandled exceptions:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"App.Current.DispatcherUnhandledException += CurrentOnDispatcherUnhandledException;\\nAppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;\\nTaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;\\n\\t\\t\\t\\t\\t\\n...\\n \\nprivate void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)\\n{\\n\\tDMFeedbackWindowController.BigIconSource = “pack://application:,,,/Images/icon.png\\\";\\n\\tDMFeedbackWindowController.ShowCrashReportDialog(e.Exception); \\n} \\nprivate void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) \\n{\\n \\tDMFeedbackWindowController.BigIconSource = “pack://application:,,,/Images/icon.png\\\";\\n \\tDMFeedbackWindowController.ShowCrashReportDialog(e.ExceptionObject as Exception);\\n}\\nprivate void CurrentOnDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) \\n{\\n \\tDMFeedbackWindowController.BigIconSource = “pack://application:,,,/Images/icon.png\\\";\\n\\tDMFeedbackWindowController.ShowCrashReportDialog(e.Exception); \\n}\\n\",\n \"language\": \"csharp\"\n }\n ]\n}\n[/block]\n#Exceptions\nGenerally, this type of a report is used to show non-critical exceptions handled with “try-catch” statement.\nFor example:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"try \\n{\\n \\tDirectory.CreateDirectory(“testFolder”); \\n} \\ncatch (Exception ex) \\n{\\n \\tTrace.TraceError(\\\"Could not create folder”);a\\n \\tDMFeedbackWindowController.BigIconSource = “pack://application:,,,/Images/icon.png\\\";\\n \\tDMFeedbackWindowController.ShowCrashReportDialog(ex, FeedbackTypes.Exception); \\n}\",\n \"language\": \"csharp\"\n }\n ]\n}\n[/block]","updates":[],"order":6,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"591f17b021d2ff0f00cf5a4f","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Get Started: Windows Apps","slug":"getting-started-windows-framework","order":2,"from_sync":false,"reference":false,"_id":"591f17af21d2ff0f00cf5a41","createdAt":"2016-07-21T09:47:49.247Z","__v":0,"project":"547cd7662eaee50800ed1089","version":"591f17ae21d2ff0f00cf5a3f"},"project":"547cd7662eaee50800ed1089","user":"547cd6ac78fd57080023ca99","__v":0,"parentDoc":null,"githubsync":"","version":{"version":"1.0.1","version_clean":"1.0.1","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["591f17af21d2ff0f00cf5a40","591f17af21d2ff0f00cf5a41","591f17af21d2ff0f00cf5a42","591f17af21d2ff0f00cf5a43","591f17af21d2ff0f00cf5a44","591f17af21d2ff0f00cf5a45","591f17af21d2ff0f00cf5a46","591f17af21d2ff0f00cf5a47","591f17af21d2ff0f00cf5a48","60805d13afe7e7003acde2f9"],"_id":"591f17ae21d2ff0f00cf5a3f","createdAt":"2017-05-19T16:05:02.775Z","__v":2,"project":"547cd7662eaee50800ed1089","releaseDate":"2017-05-19T16:05:02.775Z"},"createdAt":"2016-07-21T17:06:32.074Z"}