mirror of https://gitee.com/bigwinds/arangodb
issue #1944: nicer error logging in console.log()
This commit is contained in:
parent
306ea79e18
commit
dc51d9dea5
|
@ -98,6 +98,8 @@ global.DEFINE_MODULE('console', (function () {
|
|||
if (typeof arg === 'object') {
|
||||
if (arg === null) {
|
||||
arg = 'null';
|
||||
} else if (arg instanceof Error) {
|
||||
arg = String(arg);
|
||||
} else if (arg instanceof Date || arg instanceof RegExp) {
|
||||
arg = String(arg);
|
||||
} else if (Object.prototype.isPrototypeOf(arg) || Array.isArray(arg)) {
|
||||
|
|
Loading…
Reference in New Issue