summaryrefslogtreecommitdiff
path: root/src/luascript.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-12-28 12:30:48 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2018-12-28 12:30:48 +0100
commit16beb55484c20b8b1e92afdf5720fa3860d77309 (patch)
treeffb199f4c77247f1abef8091a5fc4ad459ecb224 /src/luascript.cc
parent0ee75305070f79b12cbfa5a31b17c543d0517428 (diff)
Show error line in red in the editor.
Diffstat (limited to 'src/luascript.cc')
-rw-r--r--src/luascript.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/luascript.cc b/src/luascript.cc
index dce5e2c..0619228 100644
--- a/src/luascript.cc
+++ b/src/luascript.cc
@@ -448,6 +448,11 @@ void LUAScript::run()
catch(Exception &e)
{
printf("LUA Error: %s\n", e.msg.c_str());
+ QStringList pieces = QString(e.msg.c_str()).split(":");
+ if(pieces.size() >= 3)
+ {
+ emit errorLine(pieces[0], pieces[1].toUInt(), pieces[2]);
+ }
}
cleanup();
lua_stopped = true;