Skip to content

Commit

Permalink
error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AsbertMa committed Jul 4, 2019
1 parent 9599dda commit 1fd4af2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { clean, build } = require('./script')
const { lint } = require('./validates')
const { redFont } = require('./utils')
const action = process.argv[2]
const net = process.argv[3]

Expand Down Expand Up @@ -51,6 +52,7 @@ async function start() {
}
}

start().catch(() => {
start().catch((error) => {
console.error(redFont(error.message))
process.exit(1)
})
1 change: 1 addition & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ async function getTokensInfo(folder) {

for (let i = 0; i < tokens.length; i++) {
const item = tokens[i]
item.address = folder.toLowerCase()
result.push(await tokenInfo(path.join(folder, item)))
}

Expand Down

0 comments on commit 1fd4af2

Please sign in to comment.