File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,17 @@ function themepark:columns(...)
133133 local cols = v
134134 if type (v ) == ' string' then
135135 local elements = osm2pgsql .split_string (v , ' /' )
136- cols = self ._columns [elements [1 ]][elements [2 ]]
136+ if # elements ~= 2 then
137+ error (" Use 'theme/column' format or table with columns as parameters in columns() function" , 2 )
138+ end
139+ local column_theme = self ._columns [elements [1 ]]
140+ if not column_theme then
141+ error (" Unknown column theme '" .. elements [1 ] .. " '" , 2 )
142+ end
143+ if not column_theme [elements [2 ]] then
144+ error (" Unknown column '" .. elements [2 ] .. " ' in theme '" .. elements [1 ] .. " '" , 2 )
145+ end
146+ cols = column_theme [elements [2 ]]
137147 end
138148 for _ , c in ipairs (cols ) do
139149 table.insert (columns , c )
You can’t perform that action at this time.
0 commit comments