hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.51k stars 4.86k forks source link

Large amount of console output #907

Closed matsko closed 9 years ago

matsko commented 10 years ago

The problem I'm faced with is that hexo spits out a ton of error-related output into the console when I am running my website. It's really annoying since I can't debug anything due to the amount of text that the command spits out. Here is a snippet of the the error output (which happens right after the hexo server is run AND the website is visited).

var __stack = { lineno: 1, input: "<%- partial('_partial/top') %>\n<% page.posts.each(function(post, i) { %>\n  <a href=\"<%= resolvePermalink(post.permalink) %>\"><%= post.title %></a>\n<% }) %>\n<div class=\"loading\">\n  <div class=\"one\"></div>\n  <div class=\"two\"></div>\n  <div class=\"three\"></div>\n</div>\n<%- partial('_partial/bottom') %>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/index.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('', (__stack.lineno=1,  partial('_partial/top') ), '\n');__stack.lineno=2; page.posts.each(function(post, i) { ; buf.push('\n  <a href="', escape((__stack.lineno=3,  resolvePermalink(post.permalink) )), '">', escape((__stack.lineno=3,  post.title )), '</a>\n');__stack.lineno=4; }) ; buf.push('\n<div class="loading">\n  <div class="one"></div>\n  <div class="two"></div>\n  <div class="three"></div>\n</div>\n', (__stack.lineno=10,  partial('_partial/bottom') ), '\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<%- partial('_partial/head') %>\n<body class=\"layout-index\">\n  <%- partial('_partial/site_header') %>\n  <main data-title=\"<%= resolvePageTitle(locals, config) %>\" data-timestamp=\"<%= timestamp() %>\">\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/top.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('', (__stack.lineno=1,  partial('_partial/head') ), '\n<body class="layout-index">\n  ', (__stack.lineno=3,  partial('_partial/site_header') ), '\n  <main data-title="', escape((__stack.lineno=4,  resolvePageTitle(locals, config) )), '" data-timestamp="', escape((__stack.lineno=4,  timestamp() )), '">\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<!DOCTYPE html> \n<html lang=\"en\">\n<head> \n<meta charset=\"UTF-8\" />\n<title><%= resolvePageTitle(locals, config) %></title>\n<meta id=\"x-description\"    name=\"description\"          content=\"<%= pick(this.description, config.description) %>\" /> \n<meta id=\"x-keywords\"       name=\"keywords\"             content=\"<%= pick(this.keywords, config.keywords) %>\" /> \n<meta id=\"x-twitter-site\"   property=\"twitter:site\"     content=\"@yearofmoo\" />\n<meta id=\"x-twitter-user\"   property=\"twitter:creator\"  content=\"@yearofmoo\" />\n<meta id=\"x-og-title\"       property=\"og:title\"         content=\"Welcome to Yearofmoo\" />\n<meta id=\"x-og-description\" property=\"og:description\"   content=\"<%= pick(this.og_description, this.description, config.description) %>\" />\n<meta id=\"x-og-site-url\"    property=\"og:url\"           content=\"<%= path || '/' %>\" />\n<meta id=\"x-og-image\"       property=\"og:image\"         content=\"<%= pick_site_image(this.site_image) %>\" />\n<meta id=\"x-og-site-name\"   property=\"og:site_name\"     content=\"yearofmoo\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1\">\n<link rel=\"apple-touch-icon\" sizes=\"72x72\"    href=\"/images/meta/ios-72x72.png\" />\n<link rel=\"apple-touch-icon\" sizes=\"114x114\"  href=\"/images/meta/ios-114x114.png\" />\n<link rel=\"apple-touch-icon\" sizes=\"144x144\"  href=\"/images/meta/ios-144x144.png\" />\n<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS Feed\" href=\"<%= config.feed.path %>\" />\n<link rel=\"icon\" type=\"image/png\" href=\"/images/favicon.png\" />\n<link rel=\"shortcut icon\" href=\"/images/favicon.png\" /> \n<%- app_css() %>\n</head>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/head.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('<!DOCTYPE html> \n<html lang="en">\n<head> \n<meta charset="UTF-8" />\n<title>', escape((__stack.lineno=5,  resolvePageTitle(locals, config) )), '</title>\n<meta id="x-description"    name="description"          content="', escape((__stack.lineno=6,  pick(this.description, config.description) )), '" /> \n<meta id="x-keywords"       name="keywords"             content="', escape((__stack.lineno=7,  pick(this.keywords, config.keywords) )), '" /> \n<meta id="x-twitter-site"   property="twitter:site"     content="@yearofmoo" />\n<meta id="x-twitter-user"   property="twitter:creator"  content="@yearofmoo" />\n<meta id="x-og-title"       property="og:title"         content="Welcome to Yearofmoo" />\n<meta id="x-og-description" property="og:description"   content="', escape((__stack.lineno=11,  pick(this.og_description, this.description, config.description) )), '" />\n<meta id="x-og-site-url"    property="og:url"           content="', escape((__stack.lineno=12,  path || '/' )), '" />\n<meta id="x-og-image"       property="og:image"         content="', escape((__stack.lineno=13,  pick_site_image(this.site_image) )), '" />\n<meta id="x-og-site-name"   property="og:site_name"     content="yearofmoo" />\n<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">\n<link rel="apple-touch-icon" sizes="72x72"    href="/images/meta/ios-72x72.png" />\n<link rel="apple-touch-icon" sizes="114x114"  href="/images/meta/ios-114x114.png" />\n<link rel="apple-touch-icon" sizes="144x144"  href="/images/meta/ios-144x144.png" />\n<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="', escape((__stack.lineno=19,  config.feed.path )), '" />\n<link rel="icon" type="image/png" href="/images/favicon.png" />\n<link rel="shortcut icon" href="/images/favicon.png" /> \n', (__stack.lineno=22,  app_css() ), '\n</head>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<header class=\"site-header row\">\n  <h1 class=\"site-logo col-sm-12 col-md-1\">\n    <a href=\"/\">\n      Yearofmoo\n    </a>\n  </h1>\n  <div class=\"col-sm-12 col-md-11\">\n    <%- partial('_partial/navigation') %>\n  </div>\n</header>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/site_header.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('<header class="site-header row">\n  <h1 class="site-logo col-sm-12 col-md-1">\n    <a href="/">\n      Yearofmoo\n    </a>\n  </h1>\n  <div class="col-sm-12 col-md-11">\n    ', (__stack.lineno=8,  partial('_partial/navigation') ), '\n  </div>\n</header>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<nav class=\"row\">\n  <div class=\"col-xs-12 col-sm-12 col-md-9 primary-navigation\">\n    <ol class=\"row\">\n      <li class=\"col-sm-12 col-md-2 nav-item nav-item-home\">\n        <a href=\"/\">Home</a>\n      </li>\n      <li class=\"col-sm-12 col-md-2 nav-item nav-item-guides-and-videos\">\n        <a href=\"/guides-and-videos\">Guides &amp; Videos</a>\n      </li>\n      <li class=\"col-sm-12 col-md-2 nav-item nav-item-blog\">\n        <a href=\"/blog-posts\">Blog</a>\n      </li>\n      <li class=\"col-sm-12 col-md-2 nav-item nav-item-about\">\n        <a href=\"/about\">About</a>\n      </li>\n      <li class=\"col-sm-12 col-md-2 nav-item nav-item-contact\">\n        <a href=\"/contact\">Contact</a>\n      </li>\n      <li class=\"col-sm-12 col-md-2 nav-item nav-item-free-updates\">\n        <a href=\"/free-updates\">Free Updates</a>\n      </li>\n    </ol>\n  </div>\n\n  <form class=\"col-xs-12 col-sm-12 col-md-3 primary-navigation-form website-search-form\">\n    <div class=\"yom-search\">\n      <input type=\"text\" placeholder=\"Search YOM\" class=\"yom-search-input\" />\n    </div>\n\n    <ul class=\"social-navigation icons-list\">\n      <li class=\"item\">\n        <a title=\"Facebook\" class=\"icon fa fa-facebook\" target=\"_blank\" rel=\"nofollow\" href=\"https://www.facebook.com/yearofmoo\">\n        </a>\n      </li>\n      <li class=\"item\">\n        <a title=\"Twitter\" class=\"icon fa fa-twitter\" target=\"_blank\" rel=\"nofollow\" href=\"https://twitter.com/yearofmoo\">\n        </a>\n      </li>\n      <li class=\"item\">\n        <a title=\"Github\" class=\"icon fa fa-github\" target=\"_blank\" rel=\"nofollow\" href=\"https://github.com/yearofmoo\">\n        </a>\n      </li>\n    </ul>\n  </form>\n</nav>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/navigation.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('<nav class="row">\n  <div class="col-xs-12 col-sm-12 col-md-9 primary-navigation">\n    <ol class="row">\n      <li class="col-sm-12 col-md-2 nav-item nav-item-home">\n        <a href="/">Home</a>\n      </li>\n      <li class="col-sm-12 col-md-2 nav-item nav-item-guides-and-videos">\n        <a href="/guides-and-videos">Guides &amp; Videos</a>\n      </li>\n      <li class="col-sm-12 col-md-2 nav-item nav-item-blog">\n        <a href="/blog-posts">Blog</a>\n      </li>\n      <li class="col-sm-12 col-md-2 nav-item nav-item-about">\n        <a href="/about">About</a>\n      </li>\n      <li class="col-sm-12 col-md-2 nav-item nav-item-contact">\n        <a href="/contact">Contact</a>\n      </li>\n      <li class="col-sm-12 col-md-2 nav-item nav-item-free-updates">\n        <a href="/free-updates">Free Updates</a>\n      </li>\n    </ol>\n  </div>\n\n  <form class="col-xs-12 col-sm-12 col-md-3 primary-navigation-form website-search-form">\n    <div class="yom-search">\n      <input type="text" placeholder="Search YOM" class="yom-search-input" />\n    </div>\n\n    <ul class="social-navigation icons-list">\n      <li class="item">\n        <a title="Facebook" class="icon fa fa-facebook" target="_blank" rel="nofollow" href="https://www.facebook.com/yearofmoo">\n        </a>\n      </li>\n      <li class="item">\n        <a title="Twitter" class="icon fa fa-twitter" target="_blank" rel="nofollow" href="https://twitter.com/yearofmoo">\n        </a>\n      </li>\n      <li class="item">\n        <a title="Github" class="icon fa fa-github" target="_blank" rel="nofollow" href="https://github.com/yearofmoo">\n        </a>\n      </li>\n    </ul>\n  </form>\n</nav>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "  </main>\n  <%- partial('_partial/site_footer') %>\n  <%- app_js() %>\n  <%- partial('_partial/google_analytics') %>\n  <%- partial('_partial/addthis_script') %>\n</body>\n</html>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/bottom.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('  </main>\n  ', (__stack.lineno=2,  partial('_partial/site_footer') ), '\n  ', (__stack.lineno=3,  app_js() ), '\n  ', (__stack.lineno=4,  partial('_partial/google_analytics') ), '\n  ', (__stack.lineno=5,  partial('_partial/addthis_script') ), '\n</body>\n</html>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<div class=\"site-footer gutter\">\n  <%- partial('_partial/newsletter-form', {\n    primary: true\n  }) %>\n  <%- partial('_partial/categories', {\n    categories: config.categories,\n    show_title: true,\n    show_name: true\n  }) %>\n  <small class=\"copyright\">&#169; 2014 yearofmoo inc.</small>\n</div>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/site_footer.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('<div class="site-footer gutter">\n  ', (__stack.lineno=2,  partial('_partial/newsletter-form', {
    primary: true
  }) ), '\n  ', (__stack.lineno=5,  partial('_partial/categories', {
    categories: config.categories,
    show_title: true,
    show_name: true
  }) ), '\n  <small class="copyright">&#169; 2014 yearofmoo inc.</small>\n</div>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<section class=\"newsletter-panel\n  <%= locals.styled ? 'styled' : '' %>\n  <%= locals.gutter ? 'gutter' : '' %>\n  <%= locals.primary ? 'primary' : '' %>\n  <%= locals.class_name || '' %>\">\n  <header>\n  <% if (locals.mookin) { %>\n    <img class=\"newsletter-mookin\" src=\"/images/mookins/sandwhich.svg\" alt=\"Signup for the newsletter!\" />\n  <% } %>\n  <% if (locals.blog_post) { %>\n    <h3>Get Free Blog Post Updates</h3>\n    <p class=\"slogan\">&amp; free tips to help you be the best programmer you can be</p>\n  <% } else { %>\n    <h3>Keep in touch with YOM</h3>\n    <p class=\"slogan\">&amp; get free tips to help you be the best programmer you can be</p>\n  <% } %>\n  </header>\n  <form class=\"newsletter-form row\">\n    <input type=\"text\" placeholder=\"First Name\" class=\"field col-xs-12 col-sm-4 col-md-4\" />\n    <input type=\"text\" placeholder=\"Last Name\" class=\"field col-xs-12 col-sm-4 col-md-4\" />\n    <button class=\"submit-button button col-xs-12 col-sm-3\">\n      Submit <span class=\"handle fa fa-arrow-circle-right\"></span>\n    </button>\n  </form>\n</section>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/newsletter-form.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('<section class="newsletter-panel\n  ', escape((__stack.lineno=2,  locals.styled ? 'styled' : '' )), '\n  ', escape((__stack.lineno=3,  locals.gutter ? 'gutter' : '' )), '\n  ', escape((__stack.lineno=4,  locals.primary ? 'primary' : '' )), '\n  ', escape((__stack.lineno=5,  locals.class_name || '' )), '">\n  <header>\n  ');__stack.lineno=7; if (locals.mookin) { ; buf.push('\n    <img class="newsletter-mookin" src="/images/mookins/sandwhich.svg" alt="Signup for the newsletter!" />\n  ');__stack.lineno=9; } ; buf.push('\n  ');__stack.lineno=10; if (locals.blog_post) { ; buf.push('\n    <h3>Get Free Blog Post Updates</h3>\n    <p class="slogan">&amp; free tips to help you be the best programmer you can be</p>\n  ');__stack.lineno=13; } else { ; buf.push('\n    <h3>Keep in touch with YOM</h3>\n    <p class="slogan">&amp; get free tips to help you be the best programmer you can be</p>\n  ');__stack.lineno=16; } ; buf.push('\n  </header>\n  <form class="newsletter-form row">\n    <input type="text" placeholder="First Name" class="field col-xs-12 col-sm-4 col-md-4" />\n    <input type="text" placeholder="Last Name" class="field col-xs-12 col-sm-4 col-md-4" />\n    <button class="submit-button button col-xs-12 col-sm-3">\n      Submit <span class="handle fa fa-arrow-circle-right"></span>\n    </button>\n  </form>\n</section>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<section class=\"categories-panel <%= locals.class_name ? locals.class_name : '' %>\">\n  <% if(locals.show_title) { %>\n    <header>\n      <h4>Browse By Categories</h4>\n    </header>\n  <% } %>\n  <% each(locals.categories, function(category) { %>\n    <% if(locals.no_links) { %>\n    <span class=\"category-item\">\n    <% } else { %>\n    <a href=\"/categories/<%= category %>/\" class=\"category-item\">\n    <% } %>\n      <span class=\"category-icon yom-icon-<%= category %> category-<%= category %>\"></span>\n      <% if(locals.show_name) { %>\n        <h5 class=\"category-heading\"><%= category %></h5>\n      <% } %>\n    <% if(locals.no_links) { %>\n    </span>\n    <% } else { %>\n    </a>\n    <% } %>\n  <% }) %>\n</section>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/categories.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('<section class="categories-panel ', escape((__stack.lineno=1,  locals.class_name ? locals.class_name : '' )), '">\n  ');__stack.lineno=2; if(locals.show_title) { ; buf.push('\n    <header>\n      <h4>Browse By Categories</h4>\n    </header>\n  ');__stack.lineno=6; } ; buf.push('\n  ');__stack.lineno=7; each(locals.categories, function(category) { ; buf.push('\n    ');__stack.lineno=8; if(locals.no_links) { ; buf.push('\n    <span class="category-item">\n    ');__stack.lineno=10; } else { ; buf.push('\n    <a href="/categories/', escape((__stack.lineno=11,  category )), '/" class="category-item">\n    ');__stack.lineno=12; } ; buf.push('\n      <span class="category-icon yom-icon-', escape((__stack.lineno=13,  category )), ' category-', escape((__stack.lineno=13,  category )), '"></span>\n      ');__stack.lineno=14; if(locals.show_name) { ; buf.push('\n        <h5 class="category-heading">', escape((__stack.lineno=15,  category )), '</h5>\n      ');__stack.lineno=16; } ; buf.push('\n    ');__stack.lineno=17; if(locals.no_links) { ; buf.push('\n    </span>\n    ');__stack.lineno=19; } else { ; buf.push('\n    </a>\n    ');__stack.lineno=21; } ; buf.push('\n  ');__stack.lineno=22; }) ; buf.push('\n</section>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<script type=\"text/javascript\">\nvar _gaq = _gaq || [];\n_gaq.push(['_setAccount', 'UA-21121403-1']);\n_gaq.push(['_trackPageview']);\n\n(function() {\n  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n})();\n</script>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/google_analytics.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('<script type="text/javascript">\nvar _gaq = _gaq || [];\n_gaq.push([\'_setAccount\', \'UA-21121403-1\']);\n_gaq.push([\'_trackPageview\']);\n\n(function() {\n  var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;\n  ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n  var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n})();\n</script>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}
var __stack = { lineno: 1, input: "<script type=\"text/javascript\" src=\"//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5034583215802ff3\" async=\"async\"></script>\n", filename: "/Users/matias/Sites/hexo.yearofmoo.com/themes/yearofmoo/layout/_partial/addthis_script.ejs" };
function rethrow(err, str, filename, lineno){
  var lines = str.split('\n')
    , start = Math.max(lineno - 3, 0)
    , end = Math.min(lines.length, lineno + 3);
20:25:18 hexo.1 |
  // Error context
  var context = lines.slice(start, end).map(function(line, i){
    var curr = i + start + 1;
    return (curr == lineno ? ' >> ' : '    ')
      + curr
      + '| '
      + line;
  }).join('\n');
20:25:18 hexo.1 |
  // Alter exception message
  err.path = filename;
  err.message = (filename || 'ejs') + ':'
    + lineno + '\n'
    + context + '\n\n'
    + err.message;
20:25:18 hexo.1 |
  throw err;
}
try {
var buf = [];
with (locals || {}) { (function(){
 buf.push('<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5034583215802ff3" async="async"></script>\n'); })();
}
return buf.join('');
} catch (err) {
  rethrow(err, __stack.input, __stack.filename, __stack.lineno);
}

I'm not entirely sure why my website that I'm building using hexo is spitting out so much error data. If I compare to the original theme then there is no error. So it may be something in my template that is causing it. No luck finding it just yet.

Has anyone else experienced this issue before?

matsko commented 10 years ago

@tommy351 ping.

leesei commented 9 years ago

Did the problem persist in latest code? What theme are you using? Can you post your repo?

matsko commented 9 years ago

No it's not there anymore. I believe the 3.x release fixed it.