Error: cannot use 'throw' with exceptions disabled

Hi, I am trying to launch my game in HTML5 and I am using opencv and dlib in the project. The game works as expected in Windows launch however, when launching the game in HTML5 using emscripten, i get the error:

error: cannot use ‘throw’ with exceptions disabled

The try…catch…throw appears in the header files of dlib and I cannot comment them out. I have tried the bEnableExceptions flag in BuildConfiguration and have also edited the HTMLToolChain “DISABLE_EXCEPTION” to 0, still the exceptions are disabled. So, how do I enable exceptions for emscripten in UE4? Am I missing something/someplace to edit?

Try looking in the UEBuildXXX.cs file, and add

CompileEnvironment.bEnableExceptions = true;