errors!
This commit is contained in:
parent
6630971abd
commit
5caf86fd58
1 changed files with 11 additions and 1 deletions
12
index.js
12
index.js
|
@ -1,3 +1,5 @@
|
||||||
|
const fs = require('fs')
|
||||||
|
|
||||||
var updateTime = (process.env.UPDATE_TIME || 30)
|
var updateTime = (process.env.UPDATE_TIME || 30)
|
||||||
|
|
||||||
const clientId = process.env.CLIENT_ID
|
const clientId = process.env.CLIENT_ID
|
||||||
|
@ -73,4 +75,12 @@ function update() {
|
||||||
|
|
||||||
client.on('ready', () => {
|
client.on('ready', () => {
|
||||||
update()
|
update()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
process.on('uncaughtException', (err, origin) => {
|
||||||
|
fs.writeSync(
|
||||||
|
process.stderr.fd,
|
||||||
|
`Caught exception: ${err}\n` +
|
||||||
|
`Exception origin: ${origin}`,
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue