diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2013-07-30 23:31:35 +0400 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2013-08-02 15:59:05 +0200 |
commit | aaa3921cb1cc1c96052630ac8a53ec2471e638d8 (patch) | |
tree | 1cc88b7b2044d2ef835c8676409aec4c11066902 /share/server/views.js | |
parent | 54e0aa0e96a3f753edcf5011b3c3aa63f63e6196 (diff) | |
download | couchdb-aaa3921cb1cc1c96052630ac8a53ec2471e638d8.tar.gz |
share/server: use toString instead of toSource
Object.toSource is [non-standard][0] and missing in v8 and probably
other javascript VMs. Its better to chop it off now that feel pain later
if we'll decide to move to different javascript engine.
[0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toSource
Diffstat (limited to 'share/server/views.js')
-rw-r--r-- | share/server/views.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/server/views.js b/share/server/views.js index 38feb4014..499a91bab 100644 --- a/share/server/views.js +++ b/share/server/views.js @@ -63,7 +63,8 @@ var Views = (function() { // will kill the OS process. This is not normally what you want. throw(err); } - var message = "function raised exception " + err.toSource(); + var message = "function raised exception " + + (err.toSource ? err.toSource() : err.stack); if (doc) message += " with doc._id " + doc._id; log(message); }; |