Skip to content

Commit abdcc76

Browse files
committed
Return error when Lua tag transform cannot be read
Fixes #841
1 parent c23c11a commit abdcc76

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tagtransform-lua.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ lua_tagtransform_t::lua_tagtransform_t(options_t const *options)
1919
m_extra_attributes(options->extra_attributes)
2020
{
2121
luaL_openlibs(L);
22-
luaL_dofile(L, options->tag_transform_script->c_str());
22+
if (luaL_dofile(L, options->tag_transform_script->c_str())) {
23+
throw std::runtime_error(
24+
(boost::format(
25+
"Lua tag transform style error: %1%") %
26+
lua_tostring(L, -1))
27+
.str());
28+
}
2329

2430
check_lua_function_exists(m_node_func);
2531
check_lua_function_exists(m_way_func);

0 commit comments

Comments
 (0)