Mirror of https://github.com/leanprover/lean2 in case it ever disappears
fd7e85f0bb
I'm using the approach described at: http://stackoverflow.com/questions/4615890/how-to-handle-c-exceptions-when-calling-functions-from-lua BTW, in some Lua versions, the C++ exceptions are correctly propagated. I think we should not rely on features of particular implementations. For example, LuaJIT does not propagate C++ exceptions. Whenever an exception is thrown from C++ code invoked from LuaJit, LuaJit interrupts the execution and converts it to an error "C++ exception". On the other hand, Lua 5.2 PUC-Rio interpreter (for Ubuntu) seem to propagate the C++ exceptions. The template safe_function solves the issue. It will also produce a Lua error whenever the function being wrapped throws an exception. The error message is based on the "what()" method. Signed-off-by: Leonardo de Moura <leonardo@microsoft.com> |
||
---|---|---|
doc | ||
examples/lean | ||
script | ||
src | ||
tests | ||
.gitignore | ||
.travis.osx.yml | ||
.travis.windows.yml | ||
.travis.yml | ||
LICENSE | ||
README.md |
Ubuntu 12.04 LTS 64bit, g++-4.8 | clang++-3.3
Windows, x86_64-w64-mingw32-g++-4.8.1
[Result of Build/UnitTest/Coverage/Dynamic Analysis]
About
Requirements
- C++11 compatible compiler: g++ (version >= 4.8.1), or clang++ (version >= 3.3)
- CMake
- GMP (GNU multiprecision library)
- MPFR (GNU MPFR Library)
- (optional) gperftools
Installing required packages at
Build Instructions
Miscellaneous
- Testing and Code Coverage
- Building Doxygen Documentation:
doxygen src/Doxyfile
- Coding style
- Git Commit Convention
- Automatic builds