Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display runtime jailed/eval errors in terminal while npm run eval-firebase-dumps #40

Closed
adrienjoly opened this issue Mar 27, 2018 · 1 comment
Assignees
Labels

Comments

@adrienjoly
Copy link
Owner

as of today, runtime jailed/eval errors are displayed that way in stderr:

Tue, 27 Mar 2018 17:00:21 GMT jailed:sandbox DYNAMIC PLUGIN:95
  const canonicalLines = studentFct.toString()
                                   ^

TypeError: Cannot read property 'toString' of undefined
    at evaluateStudentCode (DYNAMIC PLUGIN:95:36)
    at DYNAMIC PLUGIN:128:3
    at ContextifyScript.Script.runInContext (vm.js:35:29)
    at ContextifyScript.Script.runInNewContext (vm.js:41:15)
    at Object.runInNewContext (vm.js:93:38)
    at executeJailed (/Users/adrienjoly/Dev/eemi/js-test-eemi-2017-2018/node_modules/jailed-node/sandbox/sandbox.js:151:8)
    at execute (/Users/adrienjoly/Dev/eemi/js-test-eemi-2017-2018/node_modules/jailed-node/sandbox/sandbox.js:165:3)
    at process.<anonymous> (/Users/adrienjoly/Dev/eemi/js-test-eemi-2017-2018/node_modules/jailed-node/sandbox/sandbox.js:53:7)
    at emitTwo (events.js:106:13)
    at process.emit (events.js:191:7)

...and are merged with stdout before being logged in eval.log files, because I did not find a proper way to:

  • provide useful context (i.e. student code) when errors happen
  • and display just these errors in the terminal while running npm run eval-firebase-dumps
@adrienjoly adrienjoly added the bug label Mar 27, 2018
@adrienjoly adrienjoly self-assigned this May 25, 2018
@adrienjoly
Copy link
Owner Author

=> #27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant