diff options
author | Andrew Dolgov <[email protected]> | 2018-12-03 13:38:13 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-03 13:38:13 +0300 |
commit | 71fc6d45bd761a9d2715faa68f2b8c0271ee7169 (patch) | |
tree | 47677db3e0d147dbe5c3d3cc71a6576a392881f3 /plugins/mailto | |
parent | a049b5bd88f3ce07af0e2aa7c21992dc0605eea6 (diff) |
refactor error reporting to AppBase; keep exception_error() for now as a shim
Diffstat (limited to 'plugins/mailto')
-rw-r--r-- | plugins/mailto/init.js | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/plugins/mailto/init.js b/plugins/mailto/init.js index dacff725e..92a90f8e9 100644 --- a/plugins/mailto/init.js +++ b/plugins/mailto/init.js @@ -1,32 +1,27 @@ function mailtoArticle(id) { - try { - if (!id) { - const ids = Headlines.getSelected(); + if (!id) { + const ids = Headlines.getSelected(); - if (ids.length == 0) { - alert(__("No articles selected.")); - return; - } - - id = ids.toString(); + if (ids.length == 0) { + alert(__("No articles selected.")); + return; } - if (dijit.byId("emailArticleDlg")) - dijit.byId("emailArticleDlg").destroyRecursive(); + id = ids.toString(); + } - const query = "backend.php?op=pluginhandler&plugin=mailto&method=emailArticle¶m=" + encodeURIComponent(id); + if (dijit.byId("emailArticleDlg")) + dijit.byId("emailArticleDlg").destroyRecursive(); - dialog = new dijit.Dialog({ - id: "emailArticleDlg", - title: __("Forward article by email"), - style: "width: 600px", - href: query}); + const query = "backend.php?op=pluginhandler&plugin=mailto&method=emailArticle¶m=" + encodeURIComponent(id); - dialog.show(); + const dialog = new dijit.Dialog({ + id: "emailArticleDlg", + title: __("Forward article by email"), + style: "width: 600px", + href: query}); - } catch (e) { - exception_error("emailArticle", e); - } + dialog.show(); } |