Skip to content

Commit 801600e

Browse files
committedJul 15, 2020
Modify 'iwsy init' to take path
1 parent 159cb1b commit 801600e

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed
 

‎dist/plugins/iwsy.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@ const EasyCoder_IWSY = {
3030
}
3131
break;
3232
case `init`:
33-
const cdn = compiler.getNextValue();
34-
compiler.addCommand({
35-
domain: `iwsy`,
36-
keyword: `iwsy`,
37-
lino,
38-
action,
39-
cdn
40-
});
41-
return true;
33+
try {
34+
const cdn = compiler.getNextValue();
35+
compiler.addCommand({
36+
domain: `iwsy`,
37+
keyword: `iwsy`,
38+
lino,
39+
action,
40+
cdn
41+
});
42+
return true;
43+
} catch (err) {
44+
throw Error(`iwsy init: No CDN URL given`);
45+
}
4246
case `stop`:
4347
compiler.next();
4448
compiler.addCommand({

‎js/plugins/iwsy.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@ const EasyCoder_IWSY = {
3030
}
3131
break;
3232
case `init`:
33-
const cdn = compiler.getNextValue();
34-
compiler.addCommand({
35-
domain: `iwsy`,
36-
keyword: `iwsy`,
37-
lino,
38-
action,
39-
cdn
40-
});
41-
return true;
33+
try {
34+
const cdn = compiler.getNextValue();
35+
compiler.addCommand({
36+
domain: `iwsy`,
37+
keyword: `iwsy`,
38+
lino,
39+
action,
40+
cdn
41+
});
42+
return true;
43+
} catch (err) {
44+
throw Error(`iwsy init: No CDN URL given`);
45+
}
4246
case `stop`:
4347
compiler.next();
4448
compiler.addCommand({

0 commit comments

Comments
 (0)
Please sign in to comment.