Bug 1349064 - Wrap std::regex_error for GCC. - r=glandium
--- a/memory/mozalloc/throw_gcc.h
+++ b/memory/mozalloc/throw_gcc.h
@@ -133,13 +133,22 @@ MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS
__throw_system_error(int err)
{
char error[128];
snprintf(error, sizeof(error)-1,
"fatal: STL threw system_error: %s (%d)", strerror(err), err);
mozalloc_abort(error);
}
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
+__throw_regex_error(int __ecode)
+{
+ char error[128];
+ snprintf(error, sizeof(error)-1,
+ "fatal: STL threw regex_error(%d)", __ecode);
+ mozalloc_abort(error);
+}
+
} // namespace std
#undef MOZ_THROW_NORETURN
#endif // mozilla_throw_gcc_h