1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 4bb8cae81e
commit 6ab45fe935
13249 changed files with 317868 additions and 2101398 deletions

34
node_modules/verror/examples/levels-werror.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
var extsprintf = require('extsprintf');
var fs = require('fs');
var verror = require('../lib/verror');
function checkFile(filename, callback) {
fs.stat(filename, function (err) {
if (err)
/* Annotate the "stat" error with what we were doing. */
return (callback(new verror.VError(err,
'failed to check "%s"', filename)));
/* ... */
return (callback());
});
}
function handleRequest(filename, callback) {
checkFile('/nonexistent', function (err) {
if (err)
/* Wrap the "checkFile" error. */
return (callback(new verror.WError(
err, 'request failed')));
/* ... */
return (callback());
});
}
handleRequest('/nonexistent', function (err) {
if (err) {
console.log(err.message);
console.log(err.toString());
}
});