summaryrefslogtreecommitdiffstats
path: root/libcxx/include/locale
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/locale')
-rw-r--r--libcxx/include/locale4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/include/locale b/libcxx/include/locale
index f48a75ecffd..b86143e6fc4 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -3690,8 +3690,10 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
if (__r == codecvt_base::ok)
return __ws;
}
+#ifndef _LIBCPP_NO_EXCEPTIONS
if (__wide_err_string_.empty())
throw range_error("wstring_convert: from_bytes error");
+#endif
return __wide_err_string_;
}
@@ -3776,8 +3778,10 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
return __bs;
}
}
+#ifndef _LIBCPP_NO_EXCEPTIONS
if (__byte_err_string_.empty())
throw range_error("wstring_convert: to_bytes error");
+#endif
return __byte_err_string_;
}
OpenPOWER on IntegriCloud