diff Core/Lua/LuaContext.cpp @ 2954:d924f9bb61cc

taking advantage of details in OrthancException
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 03 Dec 2018 14:35:34 +0100
parents c8d369400ae1
children 4e43e67f8ecf
line wrap: on
line diff
--- a/Core/Lua/LuaContext.cpp	Mon Dec 03 11:49:39 2018 +0100
+++ b/Core/Lua/LuaContext.cpp	Mon Dec 03 14:35:34 2018 +0100
@@ -587,8 +587,7 @@
 
       std::string description(lua_tostring(lua_, -1));
       lua_pop(lua_, 1); /* pop error message from the stack */
-      LOG(ERROR) << "Error while executing Lua script: " << description;
-      throw OrthancException(ErrorCode_CannotExecuteLua);
+      throw OrthancException(ErrorCode_CannotExecuteLua, description);
     }
 
     if (output != NULL)