URL:
<http://gna.org/bugs/?15602>
Summary: Lua errors not reported when evaluating whole file
(script_do_file)
Project: Freeciv
Submitted by: englabenny
Submitted on: lördag 2010-03-13 den 16:16
Category: None
Severity: 3 - Normal
Priority: 1 - Later
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Release:
Discussion Lock: Any
Operating System: None
Planned Release:
_______________________________________________________
Details:
The user/developer gets no indication of what is wrong if lua evaluation
fails when evaluating default.lua or similar files.
Attached a patch to report the error in lua, just the first line but normally
exactly what you need to fix syntax/simple typos in the top level of the
script file.
(Lua errors in "non-toplevel", in callbacks are of course shown later, when
the callbacks are evaluated)
With this change we get helpful errors:
2: Loading rulesets
l1: lua error:
data/default/default.lua:176: ')' expected (to close '(' at line
175) near '<eof>'
0: "data/default/script.lua": could not load ruleset script.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: lördag 2010-03-13 den 16:16 Name:
0001-Report-lua-errors-in-script_do_file.patch Size: 2 kB By: englabenny
<http://gna.org/bugs/download.php?file_id=8503>
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?15602>
_______________________________________________
Meddelandet skickades via/av Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev