refactor: improve error report message

This commit is contained in:
moonrailgun 2023-12-29 20:21:52 +08:00
parent 6c266fdb5f
commit 1f950b516e

View File

@ -119,7 +119,7 @@ class MonitorManager {
this.monitorRunner[m.id] = runner;
await runner.startMonitor();
} catch (err) {
console.error('Start monitor error:', err);
console.error('Start monitor error:', String(err));
}
})
).then(() => {
@ -171,7 +171,7 @@ class MonitorRunner {
try {
value = await provider.run(monitor);
} catch (err) {
console.error(err);
logger.error('[Monitor] run error:', String(err));
value = -1;
}