summaryrefslogtreecommitdiff
path: root/jstests/core/throw_big.js
blob: ef9554966e0bcaf5a73964272b45f6d323e1d417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Test that verifies the javascript integration can handle large string exception messages.
 */
(function() {
'use strict';

var len = 65 * 1024 * 1024;
var str = new Array(len + 1).join('b');

// We expect to successfully throw and catch this large exception message.
// We do not want the mongo shell to terminate.
assert.throws(function() {
    throw str;
});
})();