Skip to content

Instantly share code, notes, and snippets.

@the-learning-man
Created February 8, 2016 23:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save the-learning-man/c1b7a2cfdcda8d4319aa to your computer and use it in GitHub Desktop.
Save the-learning-man/c1b7a2cfdcda8d4319aa to your computer and use it in GitHub Desktop.
can-compile failing with error console.log("VM EXCEPTION:", ex.stack);
decorated the function doc-helpers.js/onEnd with logging filenames.
vm.runInContext cannot parse the HTTP 301 permenantly moved message.
function onEnd () {
try {
console.log("start doc-helper/onEnd ", url, code)
vm.runInContext(code, window, url);
console.log("end doc-helper/onEnd ", url)
} catch (ex) {
console.log("VM EXCEPTION:", ex.stack);
done(ex);
}
...
}
[exec] start doc-helper/onEnd http://canjs.com/release/1.1.7/can.jquery.js <html>
[exec] <head><title>301 Moved Permanently</title></head>
[exec] <body bgcolor="white">
[exec] <center><h1>301 Moved Permanently</h1></center>
[exec] <hr><center>nginx/1.2.1</center>
[exec] </body>
[exec] </html>
[exec]
[exec] VM EXCEPTION: SyntaxError: Unexpected token <
[exec] at IncomingMessage.onEnd (/mnt/hgfs/velocloudsrc/vco/src/client/vco_ui/node_modules/can-compile/node_modules/can-simple-window/lib/doc-helpers.js:23:8)
[exec] at IncomingMessage.emit (events.js:117:20)
[exec] at _stream_readable.js:944:16
[exec] at process._tickCallback (node.js:448:13)
[exec] Compiling components/action_menu/action_menu.ejs
[exec] Warning: Unexpected token < Use --force to continue.
[exec]
[exec] Aborted due to warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment