Skip to content
Permalink
Browse files

Make get_biome_list() error message more helpful

  • Loading branch information...
kwolekr committed May 29, 2015
1 parent 0f15488 commit 522acf920fbeb034b1636df68a3db282bf823d00
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/script/lua_api/l_mapgen.cpp
@@ -416,7 +416,9 @@ size_t get_biome_list(lua_State *L, int index,
if (is_single) {
Biome *biome = get_or_load_biome(L, index, biomemgr);
if (!biome) {
errorstream << "get_biome_list: failed to get biome" << std::endl;
errorstream << "get_biome_list: failed to get biome '"
<< (lua_isstring(L, index) ? lua_tostring(L, index) : "")
<< "'." << std::endl;
return 1;
}

@@ -433,8 +435,9 @@ size_t get_biome_list(lua_State *L, int index,
Biome *biome = get_or_load_biome(L, -1, biomemgr);
if (!biome) {
fail_count++;
errorstream << "get_biome_list: failed to load biome (index "
<< count << ")" << std::endl;
errorstream << "get_biome_list: failed to get biome '"
<< (lua_isstring(L, -1) ? lua_tostring(L, -1) : "")
<< "'" << std::endl;
continue;
}

0 comments on commit 522acf9

Please sign in to comment.
You can’t perform that action at this time.