public TrackException ( |
||
e | ||
properties | string>.Dictionary | |
return | void |
public void HandleApiExceptionForMetaData(ApiException e) { _tracking.TrackException(e, new Dictionary <string, string>() { { "handled", "true" }, { "type", "metadata" }, }); var mailStr = string.Format(EmailFormat, ContactEmail, Uri.EscapeDataString(_res.ExceptionMailMetaDataSubject), Uri.EscapeDataString(string.Format(_res.ExceptionMailMetaDataBody, e.Message)) ); var content = new ToastContent { Launch = "handledMetaDataApiException", Visual = new ToastVisual { TitleText = new ToastText { Text = _res.ExceptionToastTitle }, BodyTextLine1 = new ToastText { Text = _res.ExceptionToastMetaDataContent } }, Actions = new ToastActionsCustom { Buttons = { new ToastButton(_res.ExceptionToastVisitParkenDdButton, "http://www.parkendd.de") { ActivationType = ToastActivationType.Protocol, }, new ToastButton(_res.ExceptionToastContactDevButton, mailStr) { ActivationType = ToastActivationType.Protocol, } } } }; ShowToast(content); }
private async void InstallVoiceCommandDefinitions() { //TODO: catch exceptions and log them try { var storageFile = await StorageFile.GetFileFromApplicationUriAsync( new Uri("ms-appx:///" + VoiceCommandPath)); await VoiceCommandDefinitionManager .InstallCommandDefinitionsFromStorageFileAsync(storageFile); } catch (Exception e) { _tracking.TrackException(e, new Dictionary <string, string> { { "name", "voiceCommandInit" }, { "handled", "true" } }); } }