{"action":"opened","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5169","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5169/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5169/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/5169/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/5169","id":120185657,"number":5169,"title":"Better handling of windows error codes","user":{"login":"AtnNn","id":706854,"avatar_url":"https://avatars.githubusercontent.com/u/706854?v=3","gravatar_id":"","url":"https://api.github.com/users/AtnNn","html_url":"https://github.com/AtnNn","followers_url":"https://api.github.com/users/AtnNn/followers","following_url":"https://api.github.com/users/AtnNn/following{/other_user}","gists_url":"https://api.github.com/users/AtnNn/gists{/gist_id}","starred_url":"https://api.github.com/users/AtnNn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtnNn/subscriptions","organizations_url":"https://api.github.com/users/AtnNn/orgs","repos_url":"https://api.github.com/users/AtnNn/repos","events_url":"https://api.github.com/users/AtnNn/events{/privacy}","received_events_url":"https://api.github.com/users/AtnNn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"AtnNn","id":706854,"avatar_url":"https://avatars.githubusercontent.com/u/706854?v=3","gravatar_id":"","url":"https://api.github.com/users/AtnNn","html_url":"https://github.com/AtnNn","followers_url":"https://api.github.com/users/AtnNn/followers","following_url":"https://api.github.com/users/AtnNn/following{/other_user}","gists_url":"https://api.github.com/users/AtnNn/gists{/gist_id}","starred_url":"https://api.github.com/users/AtnNn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtnNn/subscriptions","organizations_url":"https://api.github.com/users/AtnNn/orgs","repos_url":"https://api.github.com/users/AtnNn/repos","events_url":"https://api.github.com/users/AtnNn/events{/privacy}","received_events_url":"https://api.github.com/users/AtnNn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/113","html_url":"https://github.com/rethinkdb/rethinkdb/milestones/Windows","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/113/labels","id":1438261,"number":113,"title":"Windows","description":"","creator":{"login":"danielmewes","id":505365,"avatar_url":"https://avatars.githubusercontent.com/u/505365?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmewes","html_url":"https://github.com/danielmewes","followers_url":"https://api.github.com/users/danielmewes/followers","following_url":"https://api.github.com/users/danielmewes/following{/other_user}","gists_url":"https://api.github.com/users/danielmewes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmewes/subscriptions","organizations_url":"https://api.github.com/users/danielmewes/orgs","repos_url":"https://api.github.com/users/danielmewes/repos","events_url":"https://api.github.com/users/danielmewes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmewes/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":7,"state":"open","created_at":"2015-12-01T20:14:05Z","updated_at":"2015-12-03T14:40:12Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-12-03T14:40:12Z","updated_at":"2015-12-03T14:40:12Z","closed_at":null,"body":"Windows error codes returned by `GetLastError()` are different from those found in `errno`.\r\n\r\nMany RethinkDB functions expect `errno` to contain a proper error code. This is supported in the windows branch by calling `set_errno(EINVAL)` or `set_errno(EIO)` followed by `logERR(\"operation failed: %s\", winerr_string(GetLastError()).c_str())`.\r\n\r\nInstead, it may be possible to convert `GetLastError()` codes to `errno` codes, or to `set_errno(-GetLastError())` and handle negative errno in `errno_string` and other functions."}}