LOG(FATAL) throws exception in emscripten

GitOrigin-RevId: 9f2d585b5d85767dd73da30bbb490ae0dfa06354
This commit is contained in:
Arseny Smirnov 2018-03-06 14:43:46 +03:00
parent d52c3ee3f9
commit eabf46c58e
2 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,7 @@ add_subdirectory(tdutils)
add_subdirectory(td/generate)
if (NOT CMAKE_CROSSCOMPILING)
add_custom_target(prepare_cross_compiling DEPENDS tl_generate_common tdmime_auto)
add_custom_target(prepare_cross_compiling DEPENDS tl_generate_common tdmime_auto tl_generate_json)
if (TD_ENABLE_DOTNET)
add_dependencies(prepare_cross_compiling generate_dotnet_api)
endif()

View File

@ -178,6 +178,7 @@ class DefaultLog : public LogInterface {
emscripten_log(
EM_LOG_ERROR | EM_LOG_CONSOLE | EM_LOG_C_STACK | EM_LOG_JS_STACK | EM_LOG_DEMANGLE | EM_LOG_FUNC_PARAMS,
"%s", slice.c_str());
EM_ASM(throw(UTF8ToString($0)), slice.c_str());
break;
case VERBOSITY_NAME(ERROR):
emscripten_log(EM_LOG_ERROR | EM_LOG_CONSOLE, "%s", slice.c_str());