Skip to content

Commit 9e2811a

Browse files
author
thk123
committed
Disable nested exception printing for Windows
Due to bug in the VS2013 C++ compiler, using std::rethrow_if_nested or std::nested_exception is not supported. This disables trying to unwrap the exception and just prints a warning saying the nested exceptionc couldn't be printed. Fixup windows workaround
1 parent e2a8292 commit 9e2811a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/util/unwrap_nested_exception.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ std::string unwrap_exception(const std::exception &e, int level)
3535

3636
try
3737
{
38+
#ifndef _MSC_VER
3839
std::rethrow_if_nested(e);
40+
#else
41+
// TODO(tkiley): Nested exception logging not supported on windowsdue to bug
42+
// TODO(tkiley): in MSVC++ Compiler:
43+
// TODO(tkiley): https://blogs.msdn.microsoft.com/vcblog/2016/01/22/vs-2015-update-2s-stl-is-c17-so-far-feature-complete
44+
message_stream
45+
<< "\nwarning: Nested exception printing not supported on Windows";
46+
#endif
3947
}
4048
catch(const std::exception &e)
4149
{

0 commit comments

Comments
 (0)