diff --git a/src/API.cpp b/src/API.cpp index d06893919..4ff706e02 100644 --- a/src/API.cpp +++ b/src/API.cpp @@ -48,6 +48,7 @@ //////////////////////////////////////////////////////////////////////////////// #include +#include #include "Context.h" #include "API.h" @@ -223,7 +224,8 @@ static int api_task_debug_message (lua_State* L) static int api_task_exit (lua_State* L) { // TODO Is this the correct exception? How does the shell handle this? - throw std::string ("Exiting."); + std::cout << "Exiting." << std::endl; + exit (0); return 0; }