projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3708b4
)
Handle Lua errors in on_generate callbacks instead of throwing SIGABRT
author
kwolekr
<kwolekr@minetest.net>
Sat, 14 Dec 2013 06:59:16 +0000
(
01:59
-0500)
committer
kwolekr
<kwolekr@minetest.net>
Sat, 14 Dec 2013 06:59:16 +0000
(
01:59
-0500)
src/emerge.cpp
patch
|
blob
|
history
diff --git
a/src/emerge.cpp
b/src/emerge.cpp
index f096bb874a21e84dbd41250556a66d0ca1aee1d4..2f757a760e3183c655f99684f5c7b1aa36c7c990 100644
(file)
--- a/
src/emerge.cpp
+++ b/
src/emerge.cpp
@@
-554,9
+554,11
@@
void *EmergeThread::Thread() {
MapEditEventAreaIgnorer
ign(&m_server->m_ignore_map_edit_events_area,
VoxelArea(minp, maxp));
- { // takes about 90ms with -O1 on an e3-1230v2
+
try
{ // takes about 90ms with -O1 on an e3-1230v2
m_server->getScriptIface()->environment_OnGenerated(
minp, maxp, emerge->getBlockSeed(minp));
+ } catch(LuaError &e) {
+ m_server->setAsyncFatalError(e.what());
}
EMERGE_DBG_OUT("ended up with: " << analyze_block(block));