{"_id":"errno-codes","_rev":"24-4269bcd19d30cb800c731ba44a27d014","name":"errno-codes","description":"Exposes the errno codes.","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"errno-codes","version":"1.0.0","description":"Exposes the errno codes for node.js.","keywords":["error","errno"],"author":{"name":"Gabriel Llamas"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-Error.git"},"engines":{"node":">=0.4.10"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"error","readme":"<a name=\"start\"></a>\r\n\r\nNode Error\r\n==========\r\n\r\n#### Exposes the errno codes for node.js. ####\r\n\r\n[Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)\r\n\r\nVersion: 1.0.0\r\n\r\nWhen you are writing a node.js module you'll probably deal with errors. If you get a predefined error you can just resend it but if you want to instantiate a predefined one you need an errno code. Node.js does not expose these errors. Furthermore, they're not the standard errno codes. They are defined at [`deps/uv/include/uv.h`](https://github.com/joyent/node/blob/master/deps/uv/include/uv.h).\r\n\r\nThis module eases the error management providing predefined `Error` instances for every errno code and the ability to create customized errors.\r\n\r\n<a name=\"showme\"></a>\r\n#### Show me! [↑](#start) ####\r\n\r\n```javascript\r\nvar Error = require (\"error\");\r\n\r\nconsole.log (Error.get (Error.ENOENT));\r\n\r\n/*\r\nPrints:\r\n\r\n{\r\n\t[Error: ENOENT]\r\n\terrno: 34,\r\n\tcode: \"ENOENT\",\r\n\tdescription: \"no such file or directory\"\r\n}\r\n*/\r\n```\r\n\r\n<a name=\"availability\"></a>\r\n#### Availability [↑](#start) ####\r\n\r\nVia npm:\r\n\r\n```\r\nnpm install errno-codes\r\n```\r\n\r\nOr simply copying `build/error.js` into your project's directory and `require()` accordingly.\r\n\r\n***\r\n\r\n<a name=\"compatibility\"></a>\r\n#### Compatibility [↑](#start) ####\r\n\r\n✔ Node *\r\n\r\n***\r\n\r\n<a name=\"documentation\"></a>\r\n#### Documentation [↑](#start) ####\r\n \r\n[Reference](https://github.com/Gagle/Node-Error/wiki/Reference)  \r\n[Examples](https://github.com/Gagle/Node-Error/tree/master/examples)  \r\n[Change Log](https://github.com/Gagle/Node-Error/wiki/Change-Log)  \r\n[MIT License](https://github.com/Gagle/Node-Error/blob/master/LICENSE)","_id":"errno-codes@1.0.0","dist":{"shasum":"186d94ed2011aea1dfb73f590addb752777fa5a2","tarball":"https://registry.npmjs.org/errno-codes/-/errno-codes-1.0.0.tgz","integrity":"sha512-D/8iLg3Jfyvxknn0sXl2/52HtJpEXQ387/ZeH21rmgk5+UURJnOzgD5Efkym22Kq0yQMQ+84A0Mq4oYFHG8ClA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH264c8UfO+NQVSuTEx0kSSyTTcMHBIGlG1NDn7pM0gEAiEAm4OwuaVpkKX8GEz7x4DEw0L35F117XkZZxUB5rAWrXY="}]},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}],"directories":{}},"1.0.1":{"name":"errno-codes","version":"1.0.1","description":"Exposes the errno codes.","keywords":["error","errno"],"author":{"name":"Gabriel Llamas"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-Error.git"},"engines":{"node":">=0.4.10"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"error","readme":"<a name=\"start\"></a>\r\n\r\nNode Error\r\n==========\r\n\r\n_Node.js project_\r\n\r\n#### Exposes the errno codes ####\r\n\r\n[Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)\r\n\r\nVersion: 1.0.1\r\n\r\nWhen you are writing a node.js module you\"ll probably deal with errors. If you get a predefined error you can just throw it via a callback but if you want to instantiate a predefined one you need an errno code. Node.js does not expose these errors. Furthermore, they\"re not the standard errno codes. They are defined at [`deps/uv/include/uv.h`](https://github.com/joyent/node/blob/master/deps/uv/include/uv.h).\r\n\r\nThis module eases the error management providing predefined `Error` instances for every errno code and the ability to create customized errors.\r\n\r\n<a name=\"showme\"></a>\r\n#### Show me! [↑](#start) ####\r\n\r\n```javascript\r\nvar Error = require (\"errno-codes\");\r\n\r\nconsole.log (Error.get (Error.ENOENT));\r\n\r\nvar errno = Error.getNextAvailableErrno ();\r\nError.create (errno, \"TEST1\", \"test 1\");\r\nconsole.log (Error.get (Error.TEST1));\r\nconsole.log (Error.get (\"TEST1\"));\r\nconsole.log (Error.get (errno));\r\n\r\n/*\r\nPrints:\r\n\r\n{ [Error: ENOENT]\r\n  errno: 34,\r\n  code: \"ENOENT\",\r\n  description: \"no such file or directory\" }\r\n{ [Error: TEST1] errno: 100, code: \"TEST1\", description: \"test 1\" }\r\n{ [Error: TEST1] errno: 100, code: \"TEST1\", description: \"test 1\" }\r\n{ [Error: TEST1] errno: 100, code: \"TEST1\", description: \"test 1\" }\r\n*/\r\n```\r\n\r\n***\r\n\r\n<a name=\"availability\"></a>\r\n#### Availability [↑](#start) ####\r\n\r\nVia npm:\r\n\r\n```\r\nnpm install errno-codes\r\n```\r\n\r\n***\r\n\r\n<a name=\"compatibility\"></a>\r\n#### Compatibility [↑](#start) ####\r\n\r\n✔ Node *\r\n\r\n***\r\n\r\n<a name=\"documentation\"></a>\r\n#### Documentation [↑](#start) ####\r\n \r\n[Reference](https://github.com/Gagle/Node-Error/wiki/Reference)  \r\n[Examples](https://github.com/Gagle/Node-Error/tree/master/examples)  \r\n[Change Log](https://github.com/Gagle/Node-Error/wiki/Change-Log)  \r\n[MIT License](https://github.com/Gagle/Node-Error/blob/master/LICENSE)","_id":"errno-codes@1.0.1","dist":{"shasum":"61f7b075460784b040de81b07c56b09591356cbf","tarball":"https://registry.npmjs.org/errno-codes/-/errno-codes-1.0.1.tgz","integrity":"sha512-f41HtcwNTqfifSqbQcNV6LHx89pQ7fTYaPd1x2YcmavNGSVxu3o75xMwzdvdoWuT2AGmf6H+vW40L/SsWSdbGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDioRJqsggYvc9jXN3qWoD4C6eCf7UcLVaQFtCw+T09gQIgKHP9gHH0uCYtbZbMB3mZzfgA/DCSnj+M/dGVU9y16p4="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}]},"1.0.2":{"name":"errno-codes","version":"1.0.2","description":"Exposes the errno codes.","keywords":["error","errno"],"author":{"name":"Gabriel Llamas"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-Error.git"},"engines":{"node":"*"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.html"}],"main":"error","readme":"<a name=\"start\"></a>\r\n\r\nNode Error\r\n==========\r\n\r\n_Node.js project_\r\n\r\n#### Exposes the errno codes ####\r\n\r\n[Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)\r\n\r\nVersion: 1.0.2\r\n\r\nWhen you are writing a node.js module you\"ll probably deal with errors. If you get a predefined error you can just throw it via a callback but if you want to instantiate a predefined one you need an errno code. Node.js does not expose these errors. Furthermore, they\"re not the standard errno codes. They are defined at [`deps/uv/include/uv.h`](https://github.com/joyent/node/blob/master/deps/uv/include/uv.h).\r\n\r\nThis module eases the error management providing predefined `Error` instances for every errno code and the ability to create customized errors.\r\n\r\n<a name=\"showme\"></a>\r\n#### Show me! [↑](#start) ####\r\n\r\n```javascript\r\nvar Error = require (\"errno-codes\");\r\n\r\nconsole.log (Error.get (Error.ENOENT));\r\n\r\nvar errno = Error.getNextAvailableErrno ();\r\nError.create (errno, \"TEST1\", \"test 1\");\r\nconsole.log (Error.get (Error.TEST1));\r\nconsole.log (Error.get (\"TEST1\"));\r\nconsole.log (Error.get (errno));\r\n\r\n/*\r\nPrints:\r\n\r\n{ [Error: ENOENT]\r\n  errno: 34,\r\n  code: \"ENOENT\",\r\n  description: \"no such file or directory\" }\r\n{ [Error: TEST1] errno: 100, code: \"TEST1\", description: \"test 1\" }\r\n{ [Error: TEST1] errno: 100, code: \"TEST1\", description: \"test 1\" }\r\n{ [Error: TEST1] errno: 100, code: \"TEST1\", description: \"test 1\" }\r\n*/\r\n```\r\n\r\n***\r\n\r\n<a name=\"availability\"></a>\r\n#### Availability [↑](#start) ####\r\n\r\nVia npm:\r\n\r\n```\r\nnpm install errno-codes\r\n```\r\n\r\n***\r\n\r\n<a name=\"compatibility\"></a>\r\n#### Compatibility [↑](#start) ####\r\n\r\n✔ Node *\r\n\r\n***\r\n\r\n<a name=\"documentation\"></a>\r\n#### Documentation [↑](#start) ####\r\n \r\n[Reference](https://github.com/Gagle/Node-Error/wiki/Reference)  \r\n[Examples](https://github.com/Gagle/Node-Error/tree/master/examples)  \r\n[Change Log](https://github.com/Gagle/Node-Error/wiki/Change-Log)  \r\n[MIT License](https://github.com/Gagle/Node-Error/blob/master/LICENSE)","_id":"errno-codes@1.0.2","dist":{"shasum":"3e2cf56b888dd7200c4367ffc0a7d007be30c7b4","tarball":"https://registry.npmjs.org/errno-codes/-/errno-codes-1.0.2.tgz","integrity":"sha512-sckYVUjldnLSno8aS/OxlRl/rPmoy9H+fvsxq8LIn7qn/XD/HZnScbRX2/evF8oUJ9LEpu9wL3QTybiHpdVevg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYjMiuSMDt4Qw8R5UEwXIfKimJ4+3scUC0VSHodApW/wIgOJkHEasfF82imbL66Yh/ydFuZ9zZTc6DdNFQS9LSXbE="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"Gagle","email":"gaglekas@gmail.com"},"maintainers":[{"name":"Gagle","email":"gaglekas@gmail.com"}]}},"readme":"<a name=\"start\"></a>\r\n\r\nNode Error\r\n==========\r\n\r\n#### Exposes the errno codes for node.js. ####\r\n\r\n[Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)\r\n\r\nVersion: 1.0.0\r\n\r\nWhen you are writing a node.js module you'll probably deal with errors. If you get a predefined error you can just resend it but if you want to instantiate a predefined one you need an errno code. Node.js does not expose these errors. Furthermore, they're not the standard errno codes. They are defined at [`deps/uv/include/uv.h`](https://github.com/joyent/node/blob/master/deps/uv/include/uv.h).\r\n\r\nThis module eases the error management providing predefined `Error` instances for every errno code and the ability to create customized errors.\r\n\r\n<a name=\"showme\"></a>\r\n#### Show me! [↑](#start) ####\r\n\r\n```javascript\r\nvar Error = require (\"error\");\r\n\r\nconsole.log (Error.get (Error.ENOENT));\r\n\r\n/*\r\nPrints:\r\n\r\n{\r\n\t[Error: ENOENT]\r\n\terrno: 34,\r\n\tcode: \"ENOENT\",\r\n\tdescription: \"no such file or directory\"\r\n}\r\n*/\r\n```\r\n\r\n<a name=\"availability\"></a>\r\n#### Availability [↑](#start) ####\r\n\r\nVia npm:\r\n\r\n```\r\nnpm install errno-codes\r\n```\r\n\r\nOr simply copying `build/error.js` into your project's directory and `require()` accordingly.\r\n\r\n***\r\n\r\n<a name=\"compatibility\"></a>\r\n#### Compatibility [↑](#start) ####\r\n\r\n✔ Node *\r\n\r\n***\r\n\r\n<a name=\"documentation\"></a>\r\n#### Documentation [↑](#start) ####\r\n \r\n[Reference](https://github.com/Gagle/Node-Error/wiki/Reference)  \r\n[Examples](https://github.com/Gagle/Node-Error/tree/master/examples)  \r\n[Change Log](https://github.com/Gagle/Node-Error/wiki/Change-Log)  \r\n[MIT License](https://github.com/Gagle/Node-Error/blob/master/LICENSE)","maintainers":[{"name":"gagle","email":"gabriel_llamas_llopis@yahoo.es"}],"time":{"modified":"2022-06-17T08:14:09.483Z","created":"2012-08-04T13:45:20.743Z","1.0.0":"2012-08-04T13:45:23.927Z","1.0.1":"2012-10-09T15:17:01.665Z","1.0.2":"2012-10-09T16:24:29.022Z"},"author":{"name":"Gabriel Llamas"},"repository":{"type":"git","url":"git://github.com/Gagle/Node-Error.git"},"users":{"stv":true}}