fix some keyboard issues, chat tab, fix loadScript exception

This commit is contained in:
Eduardo Bart
2012-01-13 18:37:44 -02:00
parent f57d46de0e
commit aae784468b
11 changed files with 62 additions and 29 deletions

View File

@@ -297,9 +297,13 @@ void LuaInterface::loadScript(const std::string& fileName)
if(!boost::starts_with(fileName, "/"))
filePath = getCurrentSourcePath() + "/" + filePath;
std::string buffer = g_resources.loadFile(filePath);
std::string source = "@" + filePath;
loadBuffer(buffer, source);
try {
std::string buffer = g_resources.loadFile(filePath);
std::string source = "@" + filePath;
loadBuffer(buffer, source);
} catch(Exception& e) {
throw LuaException(e.what());
}
}
void LuaInterface::loadFunction(const std::string& buffer, const std::string& source)