Skip to content

Commit

Permalink
Remove line numbers from error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Jun 13, 2016
1 parent 44f90d8 commit 03b8087
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const Repl = require('./index.js')

const printPrompt = () => process.stdout.write('> ')

/** Remove line numbers from error messages.*/
const cleanError = message => message.match(/:\d+:\d+: (.*)/)[1]

console.log('Welcome to the Solidity REPL!')
printPrompt()

Expand All @@ -29,7 +32,7 @@ process.stdin.on('data', command => {
}
})
.catch(err => {
console.log(err)
console.log(cleanError(err))
})
.then(printPrompt)
}
Expand Down

0 comments on commit 03b8087

Please sign in to comment.