diff Core/Lua/LuaFunctionCall.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 878b59270859
children 4e43e67f8ecf
line wrap: on
line diff
--- a/Core/Lua/LuaFunctionCall.cpp	Mon Dec 03 11:49:39 2018 +0100
+++ b/Core/Lua/LuaFunctionCall.cpp	Mon Dec 03 14:35:34 2018 +0100
@@ -105,9 +105,8 @@
           
       std::string description(lua_tostring(context_.lua_, -1));
       lua_pop(context_.lua_, 1); /* pop error message from the stack */
-      LOG(ERROR) << description;
 
-      throw OrthancException(ErrorCode_CannotExecuteLua);
+      throw OrthancException(ErrorCode_CannotExecuteLua, description);
     }
 
     if (lua_gettop(context_.lua_) < numOutputs)