{"action":"created","issue":{"url":"https://api.github.com/repos/sakren/node-fs-mock/issues/12","labels_url":"https://api.github.com/repos/sakren/node-fs-mock/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/sakren/node-fs-mock/issues/12/comments","events_url":"https://api.github.com/repos/sakren/node-fs-mock/issues/12/events","html_url":"https://github.com/sakren/node-fs-mock/issues/12","id":87485065,"number":12,"title":"Thrown errors do not set error properties","user":{"login":"eugirdor","id":1062181,"avatar_url":"https://avatars.githubusercontent.com/u/1062181?v=3","gravatar_id":"","url":"https://api.github.com/users/eugirdor","html_url":"https://github.com/eugirdor","followers_url":"https://api.github.com/users/eugirdor/followers","following_url":"https://api.github.com/users/eugirdor/following{/other_user}","gists_url":"https://api.github.com/users/eugirdor/gists{/gist_id}","starred_url":"https://api.github.com/users/eugirdor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugirdor/subscriptions","organizations_url":"https://api.github.com/users/eugirdor/orgs","repos_url":"https://api.github.com/users/eugirdor/repos","events_url":"https://api.github.com/users/eugirdor/events{/privacy}","received_events_url":"https://api.github.com/users/eugirdor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-11T20:26:27Z","updated_at":"2015-06-12T15:08:42Z","closed_at":null,"body":"Errors thrown from the standard `fs` module have properties set on them such as `code`, `errno`, `syscall`, etc.  These properties are no set on the errors thrown by `fs-mock`.  This causes an issue since it is very common for code to branch based on the error code."},"comment":{"url":"https://api.github.com/repos/sakren/node-fs-mock/issues/comments/111521052","html_url":"https://github.com/sakren/node-fs-mock/issues/12#issuecomment-111521052","issue_url":"https://api.github.com/repos/sakren/node-fs-mock/issues/12","id":111521052,"user":{"login":"eugirdor","id":1062181,"avatar_url":"https://avatars.githubusercontent.com/u/1062181?v=3","gravatar_id":"","url":"https://api.github.com/users/eugirdor","html_url":"https://github.com/eugirdor","followers_url":"https://api.github.com/users/eugirdor/followers","following_url":"https://api.github.com/users/eugirdor/following{/other_user}","gists_url":"https://api.github.com/users/eugirdor/gists{/gist_id}","starred_url":"https://api.github.com/users/eugirdor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugirdor/subscriptions","organizations_url":"https://api.github.com/users/eugirdor/orgs","repos_url":"https://api.github.com/users/eugirdor/repos","events_url":"https://api.github.com/users/eugirdor/events{/privacy}","received_events_url":"https://api.github.com/users/eugirdor/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T15:08:42Z","updated_at":"2015-06-12T15:08:42Z","body":"Not sure about specific documentation.  I think those errors just get bubbled up from libuv.\r\n\r\nThis looks to be where it constructs the actual `Error` object https://github.com/joyent/node/blob/master/lib/util.js#L741-L753.  You can see what properties it sets there.\r\n\r\nYou can see the error codes here http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html"}}