now works with -fno-exceptions and -fno-rtti
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110828 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/locale b/include/locale
index f48a75e..b86143e 100644
--- a/include/locale
+++ b/include/locale
@@ -3690,8 +3690,10 @@
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 @@
return __bs;
}
}
+#ifndef _LIBCPP_NO_EXCEPTIONS
if (__byte_err_string_.empty())
throw range_error("wstring_convert: to_bytes error");
+#endif
return __byte_err_string_;
}