Skip to content

Commit b6a77b3

Browse files
Fixed exception include (#110)
The include for exception need to be done after NAPI_CPP_EXCEPTIONS gets defined.
1 parent 2fcea5b commit b6a77b3

File tree

1 file changed

+1
-4
lines changed
  • Core/Node-API/Include/Shared/napi

1 file changed

+1
-4
lines changed

Core/Node-API/Include/Shared/napi/napi.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
#endif // NAPI_HAS_THREADS
3737
#include <string>
3838
#include <vector>
39-
#ifdef NAPI_CPP_EXCEPTIONS
40-
#include <exception>
41-
#endif // NAPI_CPP_EXCEPTIONS
4239

4340
// VS2015 RTM has bugs with constexpr, so require min of VS2015 Update 3 (known
4441
// good version)
@@ -82,7 +79,7 @@ static_assert(sizeof(char16_t) == sizeof(wchar_t),
8279
#endif
8380

8481
#ifdef NAPI_CPP_EXCEPTIONS
85-
82+
#include <exception>
8683
// When C++ exceptions are enabled, Errors are thrown directly. There is no need
8784
// to return anything after the throw statements. The variadic parameter is an
8885
// optional return value that is ignored.

0 commit comments

Comments
 (0)