Add useful context to various error messages

This commit is contained in:
Paul Aurich
2013-09-07 15:56:55 -07:00
parent 9262f9e7de
commit 9c7c96f2a0
3 changed files with 19 additions and 13 deletions

View File

@ -245,7 +245,8 @@ static int meth_create(lua_State *L)
ssl->ssl = SSL_new(ctx);
if (!ssl->ssl) {
lua_pushnil(L);
lua_pushstring(L, "error creating SSL object");
lua_pushfstring(L, "error creating SSL object (%s)",
ERR_reason_error_string(ERR_get_error()));
return 2;
}
ssl->state = LSEC_STATE_NEW;