From 4a1edfb9bebf2a9534cd08e34d5e973757cfba38 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Tue, 26 Oct 2010 21:14:31 +0200 Subject: [PATCH] Lua - fixed task_exit hook throwing exception under certain circumstances under Ubuntu. - task_exit now exits with exit (0) instead. --- src/API.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }