Mercurial > hg > orthanc-stone
diff Framework/OpenGL/WebAssemblyOpenGLContext.cpp @ 894:f557b18d287f
wasm: error log if canvas GL context can't be created
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 16 Jul 2019 10:51:03 +0200 |
parents | 0aff28f15ea2 |
children | 685c9a2d115f |
line wrap: on
line diff
--- a/Framework/OpenGL/WebAssemblyOpenGLContext.cpp Mon Jul 15 12:48:19 2019 +0200 +++ b/Framework/OpenGL/WebAssemblyOpenGLContext.cpp Tue Jul 16 10:51:03 2019 +0200 @@ -49,8 +49,10 @@ context_ = emscripten_webgl_create_context(canvas.c_str(), &attr); if (context_ < 0) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, - "Cannot create an OpenGL context for canvas: " + canvas); + std::string message("Cannot create an OpenGL context for canvas: "); + message += canvas; + LOG(ERROR) << message; + throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, message); } UpdateSize();