fix(lua): safe_function_wrapper
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
92b2591a6f
commit
f488e6bbfc
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ Author: Leonardo de Moura
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "util/exception.h"
|
#include "util/exception.h"
|
||||||
|
#include "util/debug.h"
|
||||||
|
|
||||||
namespace lean {
|
namespace lean {
|
||||||
/**
|
/**
|
||||||
|
@ -40,7 +41,7 @@ int safe_function_wrapper(lua_State * L, lua_CFunction f){
|
||||||
_error_msg = e.what();
|
_error_msg = e.what();
|
||||||
error_msg = _error_msg.c_str();
|
error_msg = _error_msg.c_str();
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
error_msg = "unknown error";
|
throw;
|
||||||
}
|
}
|
||||||
return luaL_error(L, error_msg);
|
return luaL_error(L, error_msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue