Authored by 郭成尧

try-catch

@@ -20,6 +20,11 @@ module.exports = (limiter, policy) => { @@ -20,6 +20,11 @@ module.exports = (limiter, policy) => {
20 20
21 try { 21 try {
22 blacklist = JSON.parse(args[0]); 22 blacklist = JSON.parse(args[0]);
  23 + } catch (error) {
  24 + logger.error(error);
  25 + }
  26 +
  27 + try {
23 whitelist = JSON.parse(args[1]); 28 whitelist = JSON.parse(args[1]);
24 } catch (error) { 29 } catch (error) {
25 logger.error(error); 30 logger.error(error);