Files
mongo/jstests/core/js/throw_big.js
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00

12 lines
331 B
JavaScript

/**
* Test that verifies the javascript integration can handle large string exception messages.
*/
const len = 65 * 1024 * 1024;
const str = "b".repeat(len);
// 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;
});