<p></p>
<p><b>@SomeoneElseOSM</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/osm2pgsql/pull/1169#discussion_r425379409">src/lua-utils.cpp</a>:</p>
<pre style='color:#555'>> @@ -153,29 +153,26 @@ static int pcall_error_traceback_handler(lua_State *lua_state)
assert(lua_state);
char const *msg = lua_tostring(lua_state, 1);
- if (msg == nullptr) { // is error object not a string?
- if (luaL_callmeta(lua_state, 1,
- "__tostring") && // does it have a metamethod
- lua_type(lua_state, -1) == LUA_TSTRING) { // that produces a string?
- return 1; // that is the message
- } else {
- msg = lua_pushfstring(lua_state, "(error object is a %s value)",
- luaL_typename(lua_state, 1));
+ if (msg == nullptr) {
+ if (luaL_callmeta(lua_state, 1, "__tostring") &&
+ lua_type(lua_state, -1) == LUA_TSTRING) {
+ return 1;
</pre>
<p>Whilst I certainly wished for more explanatory comments that last time I was looking at osm2pgsql's lua interface, I'm not convinced that the ones being removed here are a great loss. What would have been really useful though would be an actual document describing how it works (and how to expand it).</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/pull/1169#discussion_r425379409">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353UPNGOM6QZ4X24QSJ3RRRA7PANCNFSM4M72BZCA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353XKIANSOCFFLVX65R3RRRA7PA5CNFSM4M72BZCKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODCIHAQY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/pull/1169#discussion_r425379409",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1169#discussion_r425379409",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>