Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated modules

  • Loading branch information...
commit 2f328756889157d510eae594e214415fb205ce3a 1 parent d28e7e5
@gagle authored
View
31 build/node_modules/errno-codes/README.md
@@ -3,13 +3,15 @@
Node Error
==========
-#### Exposes the errno codes for node.js. ####
+_Node.js project_
+
+#### Exposes the errno codes ####
[Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)
-Version: 1.0.1
+Version: 1.0.2
-When 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).
+When 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).
This module eases the error management providing predefined `Error` instances for every errno code and the ability to create customized errors.
@@ -17,19 +19,26 @@ This module eases the error management providing predefined `Error` instances fo
#### Show me! [](#start) ####
```javascript
-var Error = require ("error");
+var Error = require ("errno-codes");
console.log (Error.get (Error.ENOENT));
+var errno = Error.getNextAvailableErrno ();
+Error.create (errno, "TEST1", "test 1");
+console.log (Error.get (Error.TEST1));
+console.log (Error.get ("TEST1"));
+console.log (Error.get (errno));
+
/*
Prints:
-{
- [Error: ENOENT]
- errno: 34,
- code: "ENOENT",
- description: "no such file or directory"
-}
+{ [Error: ENOENT]
+ errno: 34,
+ code: "ENOENT",
+ description: "no such file or directory" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
*/
```
@@ -44,8 +53,6 @@ Via npm:
npm install errno-codes
```
-Or simply copying `build/error.js` into your project's directory and `require()` accordingly.
-
***
<a name="compatibility"></a>
View
2  build/node_modules/errno-codes/error.js
@@ -1 +1 @@
-"use strict";var errors={UNKNOWN:{errno:-1,code:"UNKNOWN",description:"unknown error"},OK:{errno:0,code:"OK",description:"success"},EOF:{errno:1,code:"EOF",description:"end of file"},EADDRINFO:{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},EACCES:{errno:3,code:"EACCES",description:"permission denied"},EAGAIN:{errno:4,code:"EAGAIN",description:"no more processes"},EADDRINUSE:{errno:5,code:"EADDRINUSE",description:"address already in use"},EADDRNOTAVAIL:{errno:6,code:"EADDRNOTAVAIL",description:""},EAFNOSUPPORT:{errno:7,code:"EAFNOSUPPORT",description:""},EALREADY:{errno:8,code:"EALREADY",description:""},EBADF:{errno:9,code:"EBADF",description:"bad file descriptor"},EBUSY:{errno:10,code:"EBUSY",description:"resource busy or locked"},ECONNABORTED:{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},ECONNREFUSED:{errno:12,code:"ECONNREFUSED",description:"connection refused"},ECONNRESET:{errno:13,code:"ECONNRESET",description:"connection reset by peer"},EDESTADDRREQ:{errno:14,code:"EDESTADDRREQ",description:"destination address required"},EFAULT:{errno:15,code:"EFAULT",description:"bad address in system call argument"},EHOSTUNREACH:{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},EINTR:{errno:17,code:"EINTR",description:"interrupted system call"},EINVAL:{errno:18,code:"EINVAL",description:"invalid argument"},EISCONN:{errno:19,code:"EISCONN",description:"socket is already connected"},EMFILE:{errno:20,code:"EMFILE",description:"too many open files"},EMSGSIZE:{errno:21,code:"EMSGSIZE",description:"message too long"},ENETDOWN:{errno:22,code:"ENETDOWN",description:"network is down"},ENETUNREACH:{errno:23,code:"ENETUNREACH",description:"network is unreachable"},ENFILE:{errno:24,code:"ENFILE",description:"file table overflow"},ENOBUFS:{errno:25,code:"ENOBUFS",description:"no buffer space available"},ENOMEM:{errno:26,code:"ENOMEM",description:"not enough memory"},ENOTDIR:{errno:27,code:"ENOTDIR",description:"not a directory"},EISDIR:{errno:28,code:"EISDIR",description:"illegal operation on a directory"},ENONET:{errno:29,code:"ENONET",description:"machine is not on the network"},ENOTCONN:{errno:31,code:"ENOTCONN",description:"socket is not connected"},ENOTSOCK:{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},ENOTSUP:{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},ENOENT:{errno:34,code:"ENOENT",description:"no such file or directory"},ENOSYS:{errno:35,code:"ENOSYS",description:"function not implemented"},EPIPE:{errno:36,code:"EPIPE",description:"broken pipe"},EPROTO:{errno:37,code:"EPROTO",description:"protocol error"},EPROTONOSUPPORT:{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},EPROTOTYPE:{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},ETIMEDOUT:{errno:40,code:"ETIMEDOUT",description:"connection timed out"},ECHARSET:{errno:41,code:"ECHARSET",description:""},EAIFAMNOSUPPORT:{errno:42,code:"EAIFAMNOSUPPORT",description:""},EAISERVICE:{errno:44,code:"EAISERVICE",description:""},EAISOCKTYPE:{errno:45,code:"EAISOCKTYPE",description:""},ESHUTDOWN:{errno:46,code:"ESHUTDOWN",description:""},EEXIST:{errno:47,code:"EEXIST",description:"file already exists"},ESRCH:{errno:48,code:"ESRCH",description:"no such process"},ENAMETOOLONG:{errno:49,code:"ENAMETOOLONG",description:"name too long"},EPERM:{errno:50,code:"EPERM",description:"operation not permitted"},ELOOP:{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},EXDEV:{errno:52,code:"EXDEV",description:"cross-device link not permitted"},ENOTEMPTY:{errno:53,code:"ENOTEMPTY",description:"directory not empty"},ENOSPC:{errno:54,code:"ENOSPC",description:"no space left on device"},EIO:{errno:55,code:"EIO",description:"i/o error"},EROFS:{errno:56,code:"EROFS",description:"read-only file system"},ENODEV:{errno:57,code:"ENODEV",description:"no such device"}},codes={"-1":"UNKNOWN",0:"OK",1:"EOF",2:"EADDRINFO",3:"EACCES",4:"EAGAIN",5:"EADDRINUSE",6:"EADDRNOTAVAIL",7:"EAFNOSUPPORT",8:"EALREADY",9:"EBADF",10:"EBUSY",11:"ECONNABORTED",12:"ECONNREFUSED",13:"ECONNRESET",14:"EDESTADDRREQ",15:"EFAULT",16:"EHOSTUNREACH",17:"EINTR",18:"EINVAL",19:"EISCONN",20:"EMFILE",21:"EMSGSIZE",22:"ENETDOWN",23:"ENETUNREACH",24:"ENFILE",25:"ENOBUFS",26:"ENOMEM",27:"ENOTDIR",28:"EISDIR",29:"ENONET",31:"ENOTCONN",32:"ENOTSOCK",33:"ENOTSUP",34:"ENOENT",35:"ENOSYS",36:"EPIPE",37:"EPROTO",38:"EPROTONOSUPPORT",39:"EPROTOTYPE",40:"ETIMEDOUT",41:"ECHARSET",42:"EAIFAMNOSUPPORT",44:"EAISERVICE",45:"EAISOCKTYPE",46:"ESHUTDOWN",47:"EEXIST",48:"ESRCH",49:"ENAMETOOLONG",50:"EPERM",51:"ELOOP",52:"EXDEV",53:"ENOTEMPTY",54:"ENOSPC",55:"EIO",56:"EROFS",57:"ENODEV"},nextAvailableErrno=100;errors.create=function(e,t,n){var r={errno:e,code:t,description:n};errors[t]=r,codes[e]=t},errors.get=function(e,t){var n,r=typeof e;r==="number"?n=errors[codes[e]]:r==="string"?n=errors[e]:n=e;var i=new Error(n.code);i.errno=n.errno,i.code=n.code;var s=n.description;if(t)for(var o in t)s=s.replace(new RegExp("\\{"+o+"\\}","g"),t[o]);return i.description=s,i},errors.getNextAvailableErrno=function(){var e=nextAvailableErrno;return nextAvailableErrno++,e},module.exports=errors;
+"use strict";var errors={UNKNOWN:{errno:-1,code:"UNKNOWN",description:"unknown error"},OK:{errno:0,code:"OK",description:"success"},EOF:{errno:1,code:"EOF",description:"end of file"},EADDRINFO:{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},EACCES:{errno:3,code:"EACCES",description:"permission denied"},EAGAIN:{errno:4,code:"EAGAIN",description:"no more processes"},EADDRINUSE:{errno:5,code:"EADDRINUSE",description:"address already in use"},EADDRNOTAVAIL:{errno:6,code:"EADDRNOTAVAIL",description:""},EAFNOSUPPORT:{errno:7,code:"EAFNOSUPPORT",description:""},EALREADY:{errno:8,code:"EALREADY",description:""},EBADF:{errno:9,code:"EBADF",description:"bad file descriptor"},EBUSY:{errno:10,code:"EBUSY",description:"resource busy or locked"},ECONNABORTED:{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},ECONNREFUSED:{errno:12,code:"ECONNREFUSED",description:"connection refused"},ECONNRESET:{errno:13,code:"ECONNRESET",description:"connection reset by peer"},EDESTADDRREQ:{errno:14,code:"EDESTADDRREQ",description:"destination address required"},EFAULT:{errno:15,code:"EFAULT",description:"bad address in system call argument"},EHOSTUNREACH:{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},EINTR:{errno:17,code:"EINTR",description:"interrupted system call"},EINVAL:{errno:18,code:"EINVAL",description:"invalid argument"},EISCONN:{errno:19,code:"EISCONN",description:"socket is already connected"},EMFILE:{errno:20,code:"EMFILE",description:"too many open files"},EMSGSIZE:{errno:21,code:"EMSGSIZE",description:"message too long"},ENETDOWN:{errno:22,code:"ENETDOWN",description:"network is down"},ENETUNREACH:{errno:23,code:"ENETUNREACH",description:"network is unreachable"},ENFILE:{errno:24,code:"ENFILE",description:"file table overflow"},ENOBUFS:{errno:25,code:"ENOBUFS",description:"no buffer space available"},ENOMEM:{errno:26,code:"ENOMEM",description:"not enough memory"},ENOTDIR:{errno:27,code:"ENOTDIR",description:"not a directory"},EISDIR:{errno:28,code:"EISDIR",description:"illegal operation on a directory"},ENONET:{errno:29,code:"ENONET",description:"machine is not on the network"},ENOTCONN:{errno:31,code:"ENOTCONN",description:"socket is not connected"},ENOTSOCK:{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},ENOTSUP:{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},ENOENT:{errno:34,code:"ENOENT",description:"no such file or directory"},ENOSYS:{errno:35,code:"ENOSYS",description:"function not implemented"},EPIPE:{errno:36,code:"EPIPE",description:"broken pipe"},EPROTO:{errno:37,code:"EPROTO",description:"protocol error"},EPROTONOSUPPORT:{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},EPROTOTYPE:{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},ETIMEDOUT:{errno:40,code:"ETIMEDOUT",description:"connection timed out"},ECHARSET:{errno:41,code:"ECHARSET",description:""},EAIFAMNOSUPPORT:{errno:42,code:"EAIFAMNOSUPPORT",description:""},EAISERVICE:{errno:44,code:"EAISERVICE",description:""},EAISOCKTYPE:{errno:45,code:"EAISOCKTYPE",description:""},ESHUTDOWN:{errno:46,code:"ESHUTDOWN",description:""},EEXIST:{errno:47,code:"EEXIST",description:"file already exists"},ESRCH:{errno:48,code:"ESRCH",description:"no such process"},ENAMETOOLONG:{errno:49,code:"ENAMETOOLONG",description:"name too long"},EPERM:{errno:50,code:"EPERM",description:"operation not permitted"},ELOOP:{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},EXDEV:{errno:52,code:"EXDEV",description:"cross-device link not permitted"},ENOTEMPTY:{errno:53,code:"ENOTEMPTY",description:"directory not empty"},ENOSPC:{errno:54,code:"ENOSPC",description:"no space left on device"},EIO:{errno:55,code:"EIO",description:"i/o error"},EROFS:{errno:56,code:"EROFS",description:"read-only file system"},ENODEV:{errno:57,code:"ENODEV",description:"no such device"},ESPIPE:{errno:58,code:"ESPIPE",description:"invalid seek"},ECANCELED:{errno:59,code:"ECANCELED",description:"operation canceled"}},codes={"-1":"UNKNOWN",0:"OK",1:"EOF",2:"EADDRINFO",3:"EACCES",4:"EAGAIN",5:"EADDRINUSE",6:"EADDRNOTAVAIL",7:"EAFNOSUPPORT",8:"EALREADY",9:"EBADF",10:"EBUSY",11:"ECONNABORTED",12:"ECONNREFUSED",13:"ECONNRESET",14:"EDESTADDRREQ",15:"EFAULT",16:"EHOSTUNREACH",17:"EINTR",18:"EINVAL",19:"EISCONN",20:"EMFILE",21:"EMSGSIZE",22:"ENETDOWN",23:"ENETUNREACH",24:"ENFILE",25:"ENOBUFS",26:"ENOMEM",27:"ENOTDIR",28:"EISDIR",29:"ENONET",31:"ENOTCONN",32:"ENOTSOCK",33:"ENOTSUP",34:"ENOENT",35:"ENOSYS",36:"EPIPE",37:"EPROTO",38:"EPROTONOSUPPORT",39:"EPROTOTYPE",40:"ETIMEDOUT",41:"ECHARSET",42:"EAIFAMNOSUPPORT",44:"EAISERVICE",45:"EAISOCKTYPE",46:"ESHUTDOWN",47:"EEXIST",48:"ESRCH",49:"ENAMETOOLONG",50:"EPERM",51:"ELOOP",52:"EXDEV",53:"ENOTEMPTY",54:"ENOSPC",55:"EIO",56:"EROFS",57:"ENODEV",58:"ESPIPE",59:"ECANCELED"},nextAvailableErrno=100;errors.create=function(a,b,c){var d={errno:a,code:b,description:c};errors[b]=d,codes[a]=b},errors.get=function(a,b){var c,d=typeof a;d==="number"?c=errors[codes[a]]:d==="string"?c=errors[a]:c=a;var e=new Error(c.code);e.errno=c.errno,e.code=c.code;var f=c.description;if(b)for(var g in b)f=f.replace(new RegExp("\\{"+g+"\\}","g"),b[g]);return e.description=f,e},errors.getNextAvailableErrno=function(){var a=nextAvailableErrno;return nextAvailableErrno++,a},module.exports=errors;
View
15 build/node_modules/errno-codes/package.json
@@ -1,7 +1,7 @@
{
"name": "errno-codes",
- "version": "1.0.1",
- "description": "Exposes the errno codes for node.js.",
+ "version": "1.0.2",
+ "description": "Exposes the errno codes.",
"keywords": [
"error",
"errno"
@@ -14,7 +14,7 @@
"url": "git://github.com/Gagle/Node-Error.git"
},
"engines": {
- "node": ">=0.4.10"
+ "node": "*"
},
"licenses": [
{
@@ -23,7 +23,10 @@
}
],
"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.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 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***\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.1",
- "_from": "errno-codes@1.0.1"
+ "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": "b8be551b5f5680bd6f5ec43bed8f9db29e8cf034"
+ },
+ "_from": "errno-codes@1.0.2"
}
View
31 src/node_modules/errno-codes/README.md
@@ -3,13 +3,15 @@
Node Error
==========
-#### Exposes the errno codes for node.js. ####
+_Node.js project_
+
+#### Exposes the errno codes ####
[Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)
-Version: 1.0.1
+Version: 1.0.2
-When 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).
+When 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).
This module eases the error management providing predefined `Error` instances for every errno code and the ability to create customized errors.
@@ -17,19 +19,26 @@ This module eases the error management providing predefined `Error` instances fo
#### Show me! [](#start) ####
```javascript
-var Error = require ("error");
+var Error = require ("errno-codes");
console.log (Error.get (Error.ENOENT));
+var errno = Error.getNextAvailableErrno ();
+Error.create (errno, "TEST1", "test 1");
+console.log (Error.get (Error.TEST1));
+console.log (Error.get ("TEST1"));
+console.log (Error.get (errno));
+
/*
Prints:
-{
- [Error: ENOENT]
- errno: 34,
- code: "ENOENT",
- description: "no such file or directory"
-}
+{ [Error: ENOENT]
+ errno: 34,
+ code: "ENOENT",
+ description: "no such file or directory" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
*/
```
@@ -44,8 +53,6 @@ Via npm:
npm install errno-codes
```
-Or simply copying `build/error.js` into your project's directory and `require()` accordingly.
-
***
<a name="compatibility"></a>
View
2  src/node_modules/errno-codes/error.js
@@ -1 +1 @@
-"use strict";var errors={UNKNOWN:{errno:-1,code:"UNKNOWN",description:"unknown error"},OK:{errno:0,code:"OK",description:"success"},EOF:{errno:1,code:"EOF",description:"end of file"},EADDRINFO:{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},EACCES:{errno:3,code:"EACCES",description:"permission denied"},EAGAIN:{errno:4,code:"EAGAIN",description:"no more processes"},EADDRINUSE:{errno:5,code:"EADDRINUSE",description:"address already in use"},EADDRNOTAVAIL:{errno:6,code:"EADDRNOTAVAIL",description:""},EAFNOSUPPORT:{errno:7,code:"EAFNOSUPPORT",description:""},EALREADY:{errno:8,code:"EALREADY",description:""},EBADF:{errno:9,code:"EBADF",description:"bad file descriptor"},EBUSY:{errno:10,code:"EBUSY",description:"resource busy or locked"},ECONNABORTED:{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},ECONNREFUSED:{errno:12,code:"ECONNREFUSED",description:"connection refused"},ECONNRESET:{errno:13,code:"ECONNRESET",description:"connection reset by peer"},EDESTADDRREQ:{errno:14,code:"EDESTADDRREQ",description:"destination address required"},EFAULT:{errno:15,code:"EFAULT",description:"bad address in system call argument"},EHOSTUNREACH:{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},EINTR:{errno:17,code:"EINTR",description:"interrupted system call"},EINVAL:{errno:18,code:"EINVAL",description:"invalid argument"},EISCONN:{errno:19,code:"EISCONN",description:"socket is already connected"},EMFILE:{errno:20,code:"EMFILE",description:"too many open files"},EMSGSIZE:{errno:21,code:"EMSGSIZE",description:"message too long"},ENETDOWN:{errno:22,code:"ENETDOWN",description:"network is down"},ENETUNREACH:{errno:23,code:"ENETUNREACH",description:"network is unreachable"},ENFILE:{errno:24,code:"ENFILE",description:"file table overflow"},ENOBUFS:{errno:25,code:"ENOBUFS",description:"no buffer space available"},ENOMEM:{errno:26,code:"ENOMEM",description:"not enough memory"},ENOTDIR:{errno:27,code:"ENOTDIR",description:"not a directory"},EISDIR:{errno:28,code:"EISDIR",description:"illegal operation on a directory"},ENONET:{errno:29,code:"ENONET",description:"machine is not on the network"},ENOTCONN:{errno:31,code:"ENOTCONN",description:"socket is not connected"},ENOTSOCK:{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},ENOTSUP:{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},ENOENT:{errno:34,code:"ENOENT",description:"no such file or directory"},ENOSYS:{errno:35,code:"ENOSYS",description:"function not implemented"},EPIPE:{errno:36,code:"EPIPE",description:"broken pipe"},EPROTO:{errno:37,code:"EPROTO",description:"protocol error"},EPROTONOSUPPORT:{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},EPROTOTYPE:{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},ETIMEDOUT:{errno:40,code:"ETIMEDOUT",description:"connection timed out"},ECHARSET:{errno:41,code:"ECHARSET",description:""},EAIFAMNOSUPPORT:{errno:42,code:"EAIFAMNOSUPPORT",description:""},EAISERVICE:{errno:44,code:"EAISERVICE",description:""},EAISOCKTYPE:{errno:45,code:"EAISOCKTYPE",description:""},ESHUTDOWN:{errno:46,code:"ESHUTDOWN",description:""},EEXIST:{errno:47,code:"EEXIST",description:"file already exists"},ESRCH:{errno:48,code:"ESRCH",description:"no such process"},ENAMETOOLONG:{errno:49,code:"ENAMETOOLONG",description:"name too long"},EPERM:{errno:50,code:"EPERM",description:"operation not permitted"},ELOOP:{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},EXDEV:{errno:52,code:"EXDEV",description:"cross-device link not permitted"},ENOTEMPTY:{errno:53,code:"ENOTEMPTY",description:"directory not empty"},ENOSPC:{errno:54,code:"ENOSPC",description:"no space left on device"},EIO:{errno:55,code:"EIO",description:"i/o error"},EROFS:{errno:56,code:"EROFS",description:"read-only file system"},ENODEV:{errno:57,code:"ENODEV",description:"no such device"}},codes={"-1":"UNKNOWN",0:"OK",1:"EOF",2:"EADDRINFO",3:"EACCES",4:"EAGAIN",5:"EADDRINUSE",6:"EADDRNOTAVAIL",7:"EAFNOSUPPORT",8:"EALREADY",9:"EBADF",10:"EBUSY",11:"ECONNABORTED",12:"ECONNREFUSED",13:"ECONNRESET",14:"EDESTADDRREQ",15:"EFAULT",16:"EHOSTUNREACH",17:"EINTR",18:"EINVAL",19:"EISCONN",20:"EMFILE",21:"EMSGSIZE",22:"ENETDOWN",23:"ENETUNREACH",24:"ENFILE",25:"ENOBUFS",26:"ENOMEM",27:"ENOTDIR",28:"EISDIR",29:"ENONET",31:"ENOTCONN",32:"ENOTSOCK",33:"ENOTSUP",34:"ENOENT",35:"ENOSYS",36:"EPIPE",37:"EPROTO",38:"EPROTONOSUPPORT",39:"EPROTOTYPE",40:"ETIMEDOUT",41:"ECHARSET",42:"EAIFAMNOSUPPORT",44:"EAISERVICE",45:"EAISOCKTYPE",46:"ESHUTDOWN",47:"EEXIST",48:"ESRCH",49:"ENAMETOOLONG",50:"EPERM",51:"ELOOP",52:"EXDEV",53:"ENOTEMPTY",54:"ENOSPC",55:"EIO",56:"EROFS",57:"ENODEV"},nextAvailableErrno=100;errors.create=function(e,t,n){var r={errno:e,code:t,description:n};errors[t]=r,codes[e]=t},errors.get=function(e,t){var n,r=typeof e;r==="number"?n=errors[codes[e]]:r==="string"?n=errors[e]:n=e;var i=new Error(n.code);i.errno=n.errno,i.code=n.code;var s=n.description;if(t)for(var o in t)s=s.replace(new RegExp("\\{"+o+"\\}","g"),t[o]);return i.description=s,i},errors.getNextAvailableErrno=function(){var e=nextAvailableErrno;return nextAvailableErrno++,e},module.exports=errors;
+"use strict";var errors={UNKNOWN:{errno:-1,code:"UNKNOWN",description:"unknown error"},OK:{errno:0,code:"OK",description:"success"},EOF:{errno:1,code:"EOF",description:"end of file"},EADDRINFO:{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},EACCES:{errno:3,code:"EACCES",description:"permission denied"},EAGAIN:{errno:4,code:"EAGAIN",description:"no more processes"},EADDRINUSE:{errno:5,code:"EADDRINUSE",description:"address already in use"},EADDRNOTAVAIL:{errno:6,code:"EADDRNOTAVAIL",description:""},EAFNOSUPPORT:{errno:7,code:"EAFNOSUPPORT",description:""},EALREADY:{errno:8,code:"EALREADY",description:""},EBADF:{errno:9,code:"EBADF",description:"bad file descriptor"},EBUSY:{errno:10,code:"EBUSY",description:"resource busy or locked"},ECONNABORTED:{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},ECONNREFUSED:{errno:12,code:"ECONNREFUSED",description:"connection refused"},ECONNRESET:{errno:13,code:"ECONNRESET",description:"connection reset by peer"},EDESTADDRREQ:{errno:14,code:"EDESTADDRREQ",description:"destination address required"},EFAULT:{errno:15,code:"EFAULT",description:"bad address in system call argument"},EHOSTUNREACH:{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},EINTR:{errno:17,code:"EINTR",description:"interrupted system call"},EINVAL:{errno:18,code:"EINVAL",description:"invalid argument"},EISCONN:{errno:19,code:"EISCONN",description:"socket is already connected"},EMFILE:{errno:20,code:"EMFILE",description:"too many open files"},EMSGSIZE:{errno:21,code:"EMSGSIZE",description:"message too long"},ENETDOWN:{errno:22,code:"ENETDOWN",description:"network is down"},ENETUNREACH:{errno:23,code:"ENETUNREACH",description:"network is unreachable"},ENFILE:{errno:24,code:"ENFILE",description:"file table overflow"},ENOBUFS:{errno:25,code:"ENOBUFS",description:"no buffer space available"},ENOMEM:{errno:26,code:"ENOMEM",description:"not enough memory"},ENOTDIR:{errno:27,code:"ENOTDIR",description:"not a directory"},EISDIR:{errno:28,code:"EISDIR",description:"illegal operation on a directory"},ENONET:{errno:29,code:"ENONET",description:"machine is not on the network"},ENOTCONN:{errno:31,code:"ENOTCONN",description:"socket is not connected"},ENOTSOCK:{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},ENOTSUP:{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},ENOENT:{errno:34,code:"ENOENT",description:"no such file or directory"},ENOSYS:{errno:35,code:"ENOSYS",description:"function not implemented"},EPIPE:{errno:36,code:"EPIPE",description:"broken pipe"},EPROTO:{errno:37,code:"EPROTO",description:"protocol error"},EPROTONOSUPPORT:{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},EPROTOTYPE:{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},ETIMEDOUT:{errno:40,code:"ETIMEDOUT",description:"connection timed out"},ECHARSET:{errno:41,code:"ECHARSET",description:""},EAIFAMNOSUPPORT:{errno:42,code:"EAIFAMNOSUPPORT",description:""},EAISERVICE:{errno:44,code:"EAISERVICE",description:""},EAISOCKTYPE:{errno:45,code:"EAISOCKTYPE",description:""},ESHUTDOWN:{errno:46,code:"ESHUTDOWN",description:""},EEXIST:{errno:47,code:"EEXIST",description:"file already exists"},ESRCH:{errno:48,code:"ESRCH",description:"no such process"},ENAMETOOLONG:{errno:49,code:"ENAMETOOLONG",description:"name too long"},EPERM:{errno:50,code:"EPERM",description:"operation not permitted"},ELOOP:{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},EXDEV:{errno:52,code:"EXDEV",description:"cross-device link not permitted"},ENOTEMPTY:{errno:53,code:"ENOTEMPTY",description:"directory not empty"},ENOSPC:{errno:54,code:"ENOSPC",description:"no space left on device"},EIO:{errno:55,code:"EIO",description:"i/o error"},EROFS:{errno:56,code:"EROFS",description:"read-only file system"},ENODEV:{errno:57,code:"ENODEV",description:"no such device"},ESPIPE:{errno:58,code:"ESPIPE",description:"invalid seek"},ECANCELED:{errno:59,code:"ECANCELED",description:"operation canceled"}},codes={"-1":"UNKNOWN",0:"OK",1:"EOF",2:"EADDRINFO",3:"EACCES",4:"EAGAIN",5:"EADDRINUSE",6:"EADDRNOTAVAIL",7:"EAFNOSUPPORT",8:"EALREADY",9:"EBADF",10:"EBUSY",11:"ECONNABORTED",12:"ECONNREFUSED",13:"ECONNRESET",14:"EDESTADDRREQ",15:"EFAULT",16:"EHOSTUNREACH",17:"EINTR",18:"EINVAL",19:"EISCONN",20:"EMFILE",21:"EMSGSIZE",22:"ENETDOWN",23:"ENETUNREACH",24:"ENFILE",25:"ENOBUFS",26:"ENOMEM",27:"ENOTDIR",28:"EISDIR",29:"ENONET",31:"ENOTCONN",32:"ENOTSOCK",33:"ENOTSUP",34:"ENOENT",35:"ENOSYS",36:"EPIPE",37:"EPROTO",38:"EPROTONOSUPPORT",39:"EPROTOTYPE",40:"ETIMEDOUT",41:"ECHARSET",42:"EAIFAMNOSUPPORT",44:"EAISERVICE",45:"EAISOCKTYPE",46:"ESHUTDOWN",47:"EEXIST",48:"ESRCH",49:"ENAMETOOLONG",50:"EPERM",51:"ELOOP",52:"EXDEV",53:"ENOTEMPTY",54:"ENOSPC",55:"EIO",56:"EROFS",57:"ENODEV",58:"ESPIPE",59:"ECANCELED"},nextAvailableErrno=100;errors.create=function(a,b,c){var d={errno:a,code:b,description:c};errors[b]=d,codes[a]=b},errors.get=function(a,b){var c,d=typeof a;d==="number"?c=errors[codes[a]]:d==="string"?c=errors[a]:c=a;var e=new Error(c.code);e.errno=c.errno,e.code=c.code;var f=c.description;if(b)for(var g in b)f=f.replace(new RegExp("\\{"+g+"\\}","g"),b[g]);return e.description=f,e},errors.getNextAvailableErrno=function(){var a=nextAvailableErrno;return nextAvailableErrno++,a},module.exports=errors;
View
15 src/node_modules/errno-codes/package.json
@@ -1,7 +1,7 @@
{
"name": "errno-codes",
- "version": "1.0.1",
- "description": "Exposes the errno codes for node.js.",
+ "version": "1.0.2",
+ "description": "Exposes the errno codes.",
"keywords": [
"error",
"errno"
@@ -14,7 +14,7 @@
"url": "git://github.com/Gagle/Node-Error.git"
},
"engines": {
- "node": ">=0.4.10"
+ "node": "*"
},
"licenses": [
{
@@ -23,10 +23,7 @@
}
],
"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.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 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***\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.1",
- "dist": {
- "shasum": "eeb6eab17544507306d20cca20cd643407c1702e"
- },
- "_from": "errno-codes@1.0.1"
+ "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",
+ "_from": "errno-codes@1.0.2"
}
View
31 test/tests/node_modules/buffered-writer/node_modules/errno-codes/README.md
@@ -3,13 +3,15 @@
Node Error
==========
-#### Exposes the errno codes for node.js. ####
+_Node.js project_
+
+#### Exposes the errno codes ####
[Show me!](#showme) | [Availability](#availability) | [Compatibility](#compatibility) | [Documentation](#documentation)
-Version: 1.0.1
+Version: 1.0.2
-When 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).
+When 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).
This module eases the error management providing predefined `Error` instances for every errno code and the ability to create customized errors.
@@ -17,19 +19,26 @@ This module eases the error management providing predefined `Error` instances fo
#### Show me! [](#start) ####
```javascript
-var Error = require ("error");
+var Error = require ("errno-codes");
console.log (Error.get (Error.ENOENT));
+var errno = Error.getNextAvailableErrno ();
+Error.create (errno, "TEST1", "test 1");
+console.log (Error.get (Error.TEST1));
+console.log (Error.get ("TEST1"));
+console.log (Error.get (errno));
+
/*
Prints:
-{
- [Error: ENOENT]
- errno: 34,
- code: "ENOENT",
- description: "no such file or directory"
-}
+{ [Error: ENOENT]
+ errno: 34,
+ code: "ENOENT",
+ description: "no such file or directory" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
+{ [Error: TEST1] errno: 100, code: "TEST1", description: "test 1" }
*/
```
@@ -44,8 +53,6 @@ Via npm:
npm install errno-codes
```
-Or simply copying `build/error.js` into your project's directory and `require()` accordingly.
-
***
<a name="compatibility"></a>
View
2  test/tests/node_modules/buffered-writer/node_modules/errno-codes/error.js
@@ -1 +1 @@
-"use strict";var errors={UNKNOWN:{errno:-1,code:"UNKNOWN",description:"unknown error"},OK:{errno:0,code:"OK",description:"success"},EOF:{errno:1,code:"EOF",description:"end of file"},EADDRINFO:{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},EACCES:{errno:3,code:"EACCES",description:"permission denied"},EAGAIN:{errno:4,code:"EAGAIN",description:"no more processes"},EADDRINUSE:{errno:5,code:"EADDRINUSE",description:"address already in use"},EADDRNOTAVAIL:{errno:6,code:"EADDRNOTAVAIL",description:""},EAFNOSUPPORT:{errno:7,code:"EAFNOSUPPORT",description:""},EALREADY:{errno:8,code:"EALREADY",description:""},EBADF:{errno:9,code:"EBADF",description:"bad file descriptor"},EBUSY:{errno:10,code:"EBUSY",description:"resource busy or locked"},ECONNABORTED:{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},ECONNREFUSED:{errno:12,code:"ECONNREFUSED",description:"connection refused"},ECONNRESET:{errno:13,code:"ECONNRESET",description:"connection reset by peer"},EDESTADDRREQ:{errno:14,code:"EDESTADDRREQ",description:"destination address required"},EFAULT:{errno:15,code:"EFAULT",description:"bad address in system call argument"},EHOSTUNREACH:{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},EINTR:{errno:17,code:"EINTR",description:"interrupted system call"},EINVAL:{errno:18,code:"EINVAL",description:"invalid argument"},EISCONN:{errno:19,code:"EISCONN",description:"socket is already connected"},EMFILE:{errno:20,code:"EMFILE",description:"too many open files"},EMSGSIZE:{errno:21,code:"EMSGSIZE",description:"message too long"},ENETDOWN:{errno:22,code:"ENETDOWN",description:"network is down"},ENETUNREACH:{errno:23,code:"ENETUNREACH",description:"network is unreachable"},ENFILE:{errno:24,code:"ENFILE",description:"file table overflow"},ENOBUFS:{errno:25,code:"ENOBUFS",description:"no buffer space available"},ENOMEM:{errno:26,code:"ENOMEM",description:"not enough memory"},ENOTDIR:{errno:27,code:"ENOTDIR",description:"not a directory"},EISDIR:{errno:28,code:"EISDIR",description:"illegal operation on a directory"},ENONET:{errno:29,code:"ENONET",description:"machine is not on the network"},ENOTCONN:{errno:31,code:"ENOTCONN",description:"socket is not connected"},ENOTSOCK:{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},ENOTSUP:{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},ENOENT:{errno:34,code:"ENOENT",description:"no such file or directory"},ENOSYS:{errno:35,code:"ENOSYS",description:"function not implemented"},EPIPE:{errno:36,code:"EPIPE",description:"broken pipe"},EPROTO:{errno:37,code:"EPROTO",description:"protocol error"},EPROTONOSUPPORT:{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},EPROTOTYPE:{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},ETIMEDOUT:{errno:40,code:"ETIMEDOUT",description:"connection timed out"},ECHARSET:{errno:41,code:"ECHARSET",description:""},EAIFAMNOSUPPORT:{errno:42,code:"EAIFAMNOSUPPORT",description:""},EAISERVICE:{errno:44,code:"EAISERVICE",description:""},EAISOCKTYPE:{errno:45,code:"EAISOCKTYPE",description:""},ESHUTDOWN:{errno:46,code:"ESHUTDOWN",description:""},EEXIST:{errno:47,code:"EEXIST",description:"file already exists"},ESRCH:{errno:48,code:"ESRCH",description:"no such process"},ENAMETOOLONG:{errno:49,code:"ENAMETOOLONG",description:"name too long"},EPERM:{errno:50,code:"EPERM",description:"operation not permitted"},ELOOP:{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},EXDEV:{errno:52,code:"EXDEV",description:"cross-device link not permitted"},ENOTEMPTY:{errno:53,code:"ENOTEMPTY",description:"directory not empty"},ENOSPC:{errno:54,code:"ENOSPC",description:"no space left on device"},EIO:{errno:55,code:"EIO",description:"i/o error"},EROFS:{errno:56,code:"EROFS",description:"read-only file system"},ENODEV:{errno:57,code:"ENODEV",description:"no such device"}},codes={"-1":"UNKNOWN",0:"OK",1:"EOF",2:"EADDRINFO",3:"EACCES",4:"EAGAIN",5:"EADDRINUSE",6:"EADDRNOTAVAIL",7:"EAFNOSUPPORT",8:"EALREADY",9:"EBADF",10:"EBUSY",11:"ECONNABORTED",12:"ECONNREFUSED",13:"ECONNRESET",14:"EDESTADDRREQ",15:"EFAULT",16:"EHOSTUNREACH",17:"EINTR",18:"EINVAL",19:"EISCONN",20:"EMFILE",21:"EMSGSIZE",22:"ENETDOWN",23:"ENETUNREACH",24:"ENFILE",25:"ENOBUFS",26:"ENOMEM",27:"ENOTDIR",28:"EISDIR",29:"ENONET",31:"ENOTCONN",32:"ENOTSOCK",33:"ENOTSUP",34:"ENOENT",35:"ENOSYS",36:"EPIPE",37:"EPROTO",38:"EPROTONOSUPPORT",39:"EPROTOTYPE",40:"ETIMEDOUT",41:"ECHARSET",42:"EAIFAMNOSUPPORT",44:"EAISERVICE",45:"EAISOCKTYPE",46:"ESHUTDOWN",47:"EEXIST",48:"ESRCH",49:"ENAMETOOLONG",50:"EPERM",51:"ELOOP",52:"EXDEV",53:"ENOTEMPTY",54:"ENOSPC",55:"EIO",56:"EROFS",57:"ENODEV"},nextAvailableErrno=100;errors.create=function(e,t,n){var r={errno:e,code:t,description:n};errors[t]=r,codes[e]=t},errors.get=function(e,t){var n,r=typeof e;r==="number"?n=errors[codes[e]]:r==="string"?n=errors[e]:n=e;var i=new Error(n.code);i.errno=n.errno,i.code=n.code;var s=n.description;if(t)for(var o in t)s=s.replace(new RegExp("\\{"+o+"\\}","g"),t[o]);return i.description=s,i},errors.getNextAvailableErrno=function(){var e=nextAvailableErrno;return nextAvailableErrno++,e},module.exports=errors;
+"use strict";var errors={UNKNOWN:{errno:-1,code:"UNKNOWN",description:"unknown error"},OK:{errno:0,code:"OK",description:"success"},EOF:{errno:1,code:"EOF",description:"end of file"},EADDRINFO:{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},EACCES:{errno:3,code:"EACCES",description:"permission denied"},EAGAIN:{errno:4,code:"EAGAIN",description:"no more processes"},EADDRINUSE:{errno:5,code:"EADDRINUSE",description:"address already in use"},EADDRNOTAVAIL:{errno:6,code:"EADDRNOTAVAIL",description:""},EAFNOSUPPORT:{errno:7,code:"EAFNOSUPPORT",description:""},EALREADY:{errno:8,code:"EALREADY",description:""},EBADF:{errno:9,code:"EBADF",description:"bad file descriptor"},EBUSY:{errno:10,code:"EBUSY",description:"resource busy or locked"},ECONNABORTED:{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},ECONNREFUSED:{errno:12,code:"ECONNREFUSED",description:"connection refused"},ECONNRESET:{errno:13,code:"ECONNRESET",description:"connection reset by peer"},EDESTADDRREQ:{errno:14,code:"EDESTADDRREQ",description:"destination address required"},EFAULT:{errno:15,code:"EFAULT",description:"bad address in system call argument"},EHOSTUNREACH:{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},EINTR:{errno:17,code:"EINTR",description:"interrupted system call"},EINVAL:{errno:18,code:"EINVAL",description:"invalid argument"},EISCONN:{errno:19,code:"EISCONN",description:"socket is already connected"},EMFILE:{errno:20,code:"EMFILE",description:"too many open files"},EMSGSIZE:{errno:21,code:"EMSGSIZE",description:"message too long"},ENETDOWN:{errno:22,code:"ENETDOWN",description:"network is down"},ENETUNREACH:{errno:23,code:"ENETUNREACH",description:"network is unreachable"},ENFILE:{errno:24,code:"ENFILE",description:"file table overflow"},ENOBUFS:{errno:25,code:"ENOBUFS",description:"no buffer space available"},ENOMEM:{errno:26,code:"ENOMEM",description:"not enough memory"},ENOTDIR:{errno:27,code:"ENOTDIR",description:"not a directory"},EISDIR:{errno:28,code:"EISDIR",description:"illegal operation on a directory"},ENONET:{errno:29,code:"ENONET",description:"machine is not on the network"},ENOTCONN:{errno:31,code:"ENOTCONN",description:"socket is not connected"},ENOTSOCK:{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},ENOTSUP:{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},ENOENT:{errno:34,code:"ENOENT",description:"no such file or directory"},ENOSYS:{errno:35,code:"ENOSYS",description:"function not implemented"},EPIPE:{errno:36,code:"EPIPE",description:"broken pipe"},EPROTO:{errno:37,code:"EPROTO",description:"protocol error"},EPROTONOSUPPORT:{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},EPROTOTYPE:{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},ETIMEDOUT:{errno:40,code:"ETIMEDOUT",description:"connection timed out"},ECHARSET:{errno:41,code:"ECHARSET",description:""},EAIFAMNOSUPPORT:{errno:42,code:"EAIFAMNOSUPPORT",description:""},EAISERVICE:{errno:44,code:"EAISERVICE",description:""},EAISOCKTYPE:{errno:45,code:"EAISOCKTYPE",description:""},ESHUTDOWN:{errno:46,code:"ESHUTDOWN",description:""},EEXIST:{errno:47,code:"EEXIST",description:"file already exists"},ESRCH:{errno:48,code:"ESRCH",description:"no such process"},ENAMETOOLONG:{errno:49,code:"ENAMETOOLONG",description:"name too long"},EPERM:{errno:50,code:"EPERM",description:"operation not permitted"},ELOOP:{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},EXDEV:{errno:52,code:"EXDEV",description:"cross-device link not permitted"},ENOTEMPTY:{errno:53,code:"ENOTEMPTY",description:"directory not empty"},ENOSPC:{errno:54,code:"ENOSPC",description:"no space left on device"},EIO:{errno:55,code:"EIO",description:"i/o error"},EROFS:{errno:56,code:"EROFS",description:"read-only file system"},ENODEV:{errno:57,code:"ENODEV",description:"no such device"},ESPIPE:{errno:58,code:"ESPIPE",description:"invalid seek"},ECANCELED:{errno:59,code:"ECANCELED",description:"operation canceled"}},codes={"-1":"UNKNOWN",0:"OK",1:"EOF",2:"EADDRINFO",3:"EACCES",4:"EAGAIN",5:"EADDRINUSE",6:"EADDRNOTAVAIL",7:"EAFNOSUPPORT",8:"EALREADY",9:"EBADF",10:"EBUSY",11:"ECONNABORTED",12:"ECONNREFUSED",13:"ECONNRESET",14:"EDESTADDRREQ",15:"EFAULT",16:"EHOSTUNREACH",17:"EINTR",18:"EINVAL",19:"EISCONN",20:"EMFILE",21:"EMSGSIZE",22:"ENETDOWN",23:"ENETUNREACH",24:"ENFILE",25:"ENOBUFS",26:"ENOMEM",27:"ENOTDIR",28:"EISDIR",29:"ENONET",31:"ENOTCONN",32:"ENOTSOCK",33:"ENOTSUP",34:"ENOENT",35:"ENOSYS",36:"EPIPE",37:"EPROTO",38:"EPROTONOSUPPORT",39:"EPROTOTYPE",40:"ETIMEDOUT",41:"ECHARSET",42:"EAIFAMNOSUPPORT",44:"EAISERVICE",45:"EAISOCKTYPE",46:"ESHUTDOWN",47:"EEXIST",48:"ESRCH",49:"ENAMETOOLONG",50:"EPERM",51:"ELOOP",52:"EXDEV",53:"ENOTEMPTY",54:"ENOSPC",55:"EIO",56:"EROFS",57:"ENODEV",58:"ESPIPE",59:"ECANCELED"},nextAvailableErrno=100;errors.create=function(a,b,c){var d={errno:a,code:b,description:c};errors[b]=d,codes[a]=b},errors.get=function(a,b){var c,d=typeof a;d==="number"?c=errors[codes[a]]:d==="string"?c=errors[a]:c=a;var e=new Error(c.code);e.errno=c.errno,e.code=c.code;var f=c.description;if(b)for(var g in b)f=f.replace(new RegExp("\\{"+g+"\\}","g"),b[g]);return e.description=f,e},errors.getNextAvailableErrno=function(){var a=nextAvailableErrno;return nextAvailableErrno++,a},module.exports=errors;
View
12 test/tests/node_modules/buffered-writer/node_modules/errno-codes/package.json
@@ -1,7 +1,7 @@
{
"name": "errno-codes",
- "version": "1.0.1",
- "description": "Exposes the errno codes for node.js.",
+ "version": "1.0.2",
+ "description": "Exposes the errno codes.",
"keywords": [
"error",
"errno"
@@ -14,7 +14,7 @@
"url": "git://github.com/Gagle/Node-Error.git"
},
"engines": {
- "node": ">=0.4.10"
+ "node": "*"
},
"licenses": [
{
@@ -23,7 +23,7 @@
}
],
"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.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 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***\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.1",
- "_from": "errno-codes@*"
+ "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",
+ "_from": "errno-codes@1.0.2"
}
Please sign in to comment.
Something went wrong with that request. Please try again.