erigon-pulse/jsre
Felix Lange 87ae0df476 cmd/geth, jsre: improve the js command
geth js stopped the JS runtime after running the first input file
and blocked for pending callbacks. This commit makes it process
all files and enables quitting with Ctrl-C regardless of callbacks.

Error reporting is also improved. If a script fails to load, the error
is printed and includes the backtrace. package jsre now ensures that
otto is aware of the filename, the backtrace will contain them.

Before:

$ geth js bad.js; echo "exit $?"
... log messages ...
exit 0

After:

$ geth js bad.js; echo "exit $?"
... log messages ...
Fatal: JavaScript Error: Invalid number of input parameters
    at web3.js:3109:20
    at web3.js:4917:15
    at web3.js:4960:5
    at web3.js:4984:23
    at checkWork (bad.js:11:9)
    at bad.js:19:1

exit 1
2016-04-20 23:33:43 +02:00
..
bignumber_js.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
completion_test.go all: update license information 2016-04-15 09:48:05 +02:00
completion.go all: update license information 2016-04-15 09:48:05 +02:00
ethereum_js.go rpc: various fixes/enhancements 2016-04-12 11:02:39 +02:00
jsre_test.go jsre: fix #1876, sleep too short on a slow test server 2015-11-05 11:36:10 +02:00
jsre.go cmd/geth, jsre: improve the js command 2016-04-20 23:33:43 +02:00
pretty.go jsre: hide fields with prefix _ when pretty-printing 2016-04-13 12:06:42 +02:00