fix(error handling): Fixing error handling issues with recent refactor

This commit is contained in:
Chris Troutner
2020-03-08 09:31:06 -07:00
parent aeb184d1c2
commit 763629836a
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ class Control {
} catch (error) {
wlogger.error('Error in control.ts/getNetworkInfo().', error)
return this.errorHandler(error, res)
return _this.errorHandler(error, res)
}
}
// router.get('/getMemoryInfo', (req, res, next) => {
+3 -2
View File
@@ -14,6 +14,7 @@ const util = require('util')
util.inspect.defaultOptions = { depth: 1 }
let _this
class Mining {
constructor () {
_this = this
@@ -93,7 +94,7 @@ class Mining {
} catch (err) {
wlogger.error('Error in mining.ts/getMiningInfo().', err)
return this.errorHandler(err, res)
return _this.errorHandler(err, res)
}
}
@@ -129,7 +130,7 @@ class Mining {
} catch (err) {
wlogger.error('Error in mining.ts/getNetworkHashPS().', err)
return this.errorHandler(err, res)
return _this.errorHandler(err, res)
}
}