Added logic in case throwErr() is not given a req
parent
dcf522fcb5
commit
4bcf4da286
|
@ -7,7 +7,7 @@ module.exports = {
|
||||||
|
|
||||||
// Throw error
|
// Throw error
|
||||||
throwErr: (err, req=null) => {
|
throwErr: (err, req=null) => {
|
||||||
debug(`throwErr(${err.message},${req.url})`)
|
debug(`throwErr(${err.message},${req?req.url:'null'})`)
|
||||||
console.error(err.stack)
|
console.error(err.stack)
|
||||||
if (req) {
|
if (req) {
|
||||||
if (env.mode==='production') {
|
if (env.mode==='production') {
|
||||||
|
|
Loading…
Reference in New Issue