private void OnAddFromClipboardClick(object sender, EventArgs e) { string patch = null; try { patch = Clipboard.GetText(); } catch (Exception exc) when(!exc.IsCritical()) { } if (!string.IsNullOrWhiteSpace(patch)) { var src = new PatchFromString("Patch from clipboard", patch); AddPatchSource(src); } }
private void OnAddFromClipboardClick(object sender, EventArgs e) { string patch = null; try { patch = Clipboard.GetText(); } catch(Exception exc) { if(exc.IsCritical()) { throw; } } if(!string.IsNullOrWhiteSpace(patch)) { var src = new PatchFromString("Patch from clipboard", patch); AddPatchSource(src); } }