public static Notify ( [ message, |
||
message | [ | Ex.: “Can’t do this and that”. |
exception | Exception which caused the problem. | |
solutions | IEnumerable |
A bunch of possible solutions. |
m | [ | Member at which error occured. |
p | [ | File at which error occured. |
l | [ | Line at which error occured. |
Результат | void |
public static void SetText(string text) { Exception exception = null; for (var i = 0; i < 5; i++) { try { Clipboard.SetText(text); return; } catch (Exception e) { Thread.Sleep(10); exception = e; } } NonfatalError.Notify("Can’t copy text", "No access to clipboard.", exception); }
protected override async Task ExecuteInner() { try { using (var waiting = new WaitingDialog()) { waiting.Report("Solving the issue…"); await _execute(waiting.CancellationToken); } } catch (TaskCanceledException) { return; } catch (Exception e) { NonfatalError.Notify("Can’t solve the issue", e); return; } Solved = true; if (_entry != null) { NonfatalError.Instance.Errors.Remove(_entry); } }