GT2/GT2-Android/node_modules/verror/package.json

87 lines
23 KiB
JSON
Raw Normal View History

{
"_args": [
[
{
"raw": "verror@1.10.0",
"scope": null,
"escapedName": "verror",
"name": "verror",
"rawSpec": "1.10.0",
"spec": "1.10.0",
"type": "version"
},
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/jsprim"
]
],
"_from": "verror@1.10.0",
"_id": "verror@1.10.0",
"_inCache": true,
"_location": "/verror",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/verror-1.10.0.tgz_1493743247437_0.7535550429020077"
},
"_npmUser": {
"name": "dap",
"email": "dap@cs.brown.edu"
},
"_npmVersion": "1.4.9",
"_phantomChildren": {},
"_requested": {
"raw": "verror@1.10.0",
"scope": null,
"escapedName": "verror",
"name": "verror",
"rawSpec": "1.10.0",
"spec": "1.10.0",
"type": "version"
},
"_requiredBy": [
"/jsprim"
],
"_resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"_shasum": "3a105ca17053af55d6e270c1f8288682e18da400",
"_shrinkwrap": null,
"_spec": "verror@1.10.0",
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/jsprim",
"bugs": {
"url": "https://github.com/davepacheco/node-verror/issues"
},
"dependencies": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
},
"description": "richer JavaScript errors",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "3a105ca17053af55d6e270c1f8288682e18da400",
"tarball": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz"
},
"engines": [
"node >=0.6.0"
],
"homepage": "https://github.com/davepacheco/node-verror#readme",
"license": "MIT",
"main": "./lib/verror.js",
"maintainers": [
{
"name": "dap",
"email": "dap@cs.brown.edu"
}
],
"name": "verror",
"optionalDependencies": {},
"readme": "# verror: rich JavaScript errors\n\nThis module provides several classes in support of Joyent's [Best Practices for\nError Handling in Node.js](http://www.joyent.com/developers/node/design/errors).\nIf you find any of the behavior here confusing or surprising, check out that\ndocument first.\n\nThe error classes here support:\n\n* printf-style arguments for the message\n* chains of causes\n* properties to provide extra information about the error\n* creating your own subclasses that support all of these\n\nThe classes here are:\n\n* **VError**, for chaining errors while preserving each one's error message.\n This is useful in servers and command-line utilities when you want to\n propagate an error up a call stack, but allow various levels to add their own\n context. See examples below.\n* **WError**, for wrapping errors while hiding the lower-level messages from the\n top-level error. This is useful for API endpoints where you don't want to\n expose internal error messages, but you still want to preserve the error chain\n for logging and debugging.\n* **SError**, which is just like VError but interprets printf-style arguments\n more strictly.\n* **MultiError**, which is just an Error that encapsulates one or more other\n errors. (This is used for parallel operations that return several errors.)\n\n\n# Quick start\n\nFirst, install the package:\n\n npm install verror\n\nIf nothing else, you can use VError as a drop-in replacement for the built-in\nJavaScript Error class, with the addition of printf-style messages:\n\n```javascript\nvar err = new VError('missing file: \"%s\"', '/etc/passwd');\nconsole.log(err.message);\n```\n\nThis prints:\n\n missing file: \"/etc/passwd\"\n\nYou can also pass a `cause` argument, which is any other Error object:\n\n```javascript\nvar fs = require('fs');\nvar filename = '/nonexistent';\nfs.stat(filename, function (err1) {\n\tvar err2 = new VError(err1, 'stat \"%s\"', filename);\n\tconsole.error(err2.message);\n});\n```\n\nThis prints out:\n\n stat \"/nonexistent\": ENOENT, stat '/nonexistent'\n\nwhich resembles how Unix programs typically report errors:\n\n $ sort /nonexistent\n sort: open failed: /nonexistent: No such file or directory\n\nTo match the Unixy feel, when you print out the error, just prepend the\nprogram's name to the VError's `message`. Or just call\n[node-cmdutil.fail(your_verror)](https://github.com/joyent/node-cmdutil), which\ndoes this for you.\n\nYou can get the next-level Error using `err.cause()`:\n\n```javascript\nconsole.error(err2.cause().message);\n```\n\nprints:\n\n ENOENT, stat '/nonexistent'\n\nOf course, you can chain these as many times as you want, and it works with any\nkind of Error:\n\n```javascript\nvar err1 = new Error('No such file or directory');\nvar err2 = new VError(err1, 'failed to stat \"%s\"', '/junk');\nvar err3 = new VError(err2, 'request failed');\nconsole.error(err3.message);\n```\n\nThis prints:\n\n request failed: failed to stat \"/junk\": No such file or directory\n\nThe idea is that each layer in the stack annotates the error with a description\nof what it was doing. The end result is a message that explains what happened\nat each level.\n\nYou can also decorate Error objects with additional information so that callers\ncan not only handle each kind of error differently, but also construct their own\nerror messages (e.g., to localize them, format them, group them by type, and so\non). See the example below.\n\n\n# Deeper dive\n\nThe two main goals for VError are:\n\n* **Make it easy to construct clear, complete error messages intended for\n people.** Clear error messages greatly improve both user experience and\n debuggability, so we wanted to make it easy to build them. That's why the\n constructor takes printf-style arguments.\n* **Make it easy to construct objects with programmatically-accessible\n metadata** (which we call _informational properties_). Instead of just saying\n \"connection refused while connecting to 192.168.1.2:80\", you can add\n properties like `\"ip\": \"19
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/davepacheco/node-verror.git"
},
"scripts": {
"test": "make test"
},
"version": "1.10.0"
}