diff options
author | anekos | 2011-06-22 18:22:12 +0900 |
---|---|---|
committer | anekos | 2011-06-22 18:22:12 +0900 |
commit | 04462e4bee76682f39f70748e1f0a1909d57e97b (patch) | |
tree | 3497ff597484089dfdbbc21d6f42719c1a7be937 /twittperator.js | |
parent | 3659e2ce3d368a08bfc497836a6d00a59df2edab (diff) | |
download | vimperator-plugins-04462e4bee76682f39f70748e1f0a1909d57e97b.tar.bz2 |
callback でのエラーは捕まえないようにした
Diffstat (limited to 'twittperator.js')
-rw-r--r-- | twittperator.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/twittperator.js b/twittperator.js index fc439db..969bd56 100644 --- a/twittperator.js +++ b/twittperator.js @@ -1237,8 +1237,9 @@ let PLUGIN_INFO = url + '.json', query, function (text) { + let json; try { - return callback(JSON.parse(text)); + json = JSON.parse(text); } catch (e) { (onError || @@ -1248,6 +1249,7 @@ let PLUGIN_INFO = throw e; })(e); } + return callback(json); } ); }; |