/// ------------------------------------------------------------------------------------ public static void HandleGlobalNAudioException(object sender, CancelExceptionHandlingEventArgs e) { if (!GetIsNAudioError(e.Exception)) { return; } e.Cancel = true; if (NAudioExceptionThrown != null) { NAudioExceptionThrown(e.Exception); } DisplayNAudioError(e.Exception); }
/// ------------------------------------------------------------------------------------ private bool AttemptBeginAnnotationRecording(string path) { try { AudioUtils.NAudioExceptionThrown += HandleNAudioExceptionThrownDuringRecord; return(Recorder.BeginAnnotationRecording(path)); } catch (Exception e) { AudioUtils.NAudioExceptionThrown -= HandleNAudioExceptionThrownDuringRecord; var args = new CancelExceptionHandlingEventArgs(e); AudioUtils.HandleGlobalNAudioException(this, args); if (!args.Cancel) { ErrorReport.NotifyUserOfProblem(e, LocalizationManager.GetString( "DialogBoxes.Transcription.OralAnnotationRecorderDlgBase.UnexpectedErrorAttemptingToRecordMsg", "An unexpected error occurred when attempting to record an annotation.")); } return(false); } }
private static void ReportError(object sender, CancelExceptionHandlingEventArgs e) { Analytics.ReportException(e.Exception); }
private static void ReportError(object sender, CancelExceptionHandlingEventArgs e) { Analytics.ReportException(e.Exception); }