@@ -345,19 +345,19 @@ inline size_t count_utf8_to_utf16(const std::string& s)
345345
346346 if ((c & BIT7) == 0 )
347347 {
348- throw std::range_error (" UTF-8 string character can never start with 10xxxxxx" );
348+ // throw std::range_error("UTF-8 string character can never start with 10xxxxxx");
349349 }
350350 else if ((c & BIT6) == 0 ) // 2 byte character, 0x80 to 0x7FF
351351 {
352352 if (index == sSize )
353353 {
354- throw std::range_error (" UTF-8 string is missing bytes in character" );
354+ // throw std::range_error("UTF-8 string is missing bytes in character");
355355 }
356356
357357 const UtilCharInternal_t c2 {sData [index++]};
358358 if ((c2 & 0xC0 ) != BIT8)
359359 {
360- throw std::range_error (" UTF-8 continuation byte is missing leading bit mask" );
360+ // throw std::range_error("UTF-8 continuation byte is missing leading bit mask");
361361 }
362362
363363 // can't require surrogates for 7FF
@@ -367,14 +367,14 @@ inline size_t count_utf8_to_utf16(const std::string& s)
367367 {
368368 if (sSize - index < 2 )
369369 {
370- throw std::range_error (" UTF-8 string is missing bytes in character" );
370+ // throw std::range_error("UTF-8 string is missing bytes in character");
371371 }
372372
373373 const UtilCharInternal_t c2 {sData [index++]};
374374 const UtilCharInternal_t c3 {sData [index++]};
375375 if (((c2 | c3) & 0xC0 ) != BIT8)
376376 {
377- throw std::range_error (" UTF-8 continuation byte is missing leading bit mask" );
377+ // throw std::range_error("UTF-8 continuation byte is missing leading bit mask");
378378 }
379379
380380 result -= 2 ;
@@ -383,15 +383,15 @@ inline size_t count_utf8_to_utf16(const std::string& s)
383383 {
384384 if (sSize - index < 3 )
385385 {
386- throw std::range_error (" UTF-8 string is missing bytes in character" );
386+ // throw std::range_error("UTF-8 string is missing bytes in character");
387387 }
388388
389389 const UtilCharInternal_t c2 {sData [index++]};
390390 const UtilCharInternal_t c3 {sData [index++]};
391391 const UtilCharInternal_t c4 {sData [index++]};
392392 if (((c2 | c3 | c4) & 0xC0 ) != BIT8)
393393 {
394- throw std::range_error (" UTF-8 continuation byte is missing leading bit mask" );
394+ // throw std::range_error("UTF-8 continuation byte is missing leading bit mask");
395395 }
396396
397397 const uint32_t codePoint =
@@ -400,7 +400,7 @@ inline size_t count_utf8_to_utf16(const std::string& s)
400400 }
401401 else
402402 {
403- throw std::range_error (" UTF-8 string has invalid Unicode code point" );
403+ // throw std::range_error("UTF-8 string has invalid Unicode code point");
404404 }
405405 }
406406
0 commit comments