diff options
author | Tony Hannan <tony@10gen.com> | 2010-10-13 10:14:37 -0400 |
---|---|---|
committer | Tony Hannan <tony@10gen.com> | 2010-10-13 10:14:37 -0400 |
commit | c77a4e59301206f74d4e6c8fc101fe0bc2d4fcda (patch) | |
tree | 69dd9d3e659fe83cfc13a6e4f8b2f916c65eb3c3 /scripting | |
parent | 2a7f26cc8ff63a453215fa217869626ed8a7e0eb (diff) | |
download | mongo-c77a4e59301206f74d4e6c8fc101fe0bc2d4fcda.tar.gz |
SERVER-1902: Make Assertion failure JS_EncodeCharacters more verbose in log
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/engine_spidermonkey.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp index 048808fbb3a..7030a7e9e34 100644 --- a/scripting/engine_spidermonkey.cpp +++ b/scripting/engine_spidermonkey.cpp @@ -202,7 +202,8 @@ namespace mongo { // units, but experiments suggest 8bit units expected. We allocate // enough memory that either will work. - assert( JS_EncodeCharacters( _context , s , srclen , dst , &len) ); + if ( !JS_EncodeCharacters( _context , s , srclen , dst , &len) ) + uasserted( 13498, str::stream() << "Not proper UTF-16: " << s); string ss( dst , len ); free( dst ); |