mirror of https://gitee.com/bigwinds/arangodb
do not abort printing objects when toString() throws
This commit is contained in:
parent
17098dd4ef
commit
2cd89f3028
|
@ -446,7 +446,12 @@
|
|||
printObject(value, seen, path, names, level);
|
||||
}
|
||||
else if (typeof value.toString === "function") {
|
||||
output(value.toString());
|
||||
// it's possible that toString() throws, and this looks quite ugly
|
||||
try {
|
||||
output(value.toString());
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
printObject(value, seen, path, names, level);
|
||||
|
|
Loading…
Reference in New Issue