-
Notifications
You must be signed in to change notification settings - Fork 162
Open
Labels
Description
When developing locally stack traces are crucial.
Scenario
// functions/__main__.js
const myBrokenHelper = require('../helper');
/**
* A basic Hello World function
* @param {string} name Who you're saying hello to
* @returns {string}
*/
module.exports = (name = 'world', context, callback) => {
try {
myBrokenHelper();
} catch (e) {
console.log(e.stack);
}
callback(null, `hello ${name}`);
};
// helper.js
module.exports = () => console.log(runtimeError)
Expected Outcome
$ lib .
ReferenceError: runtimeError is not defined
at module.exports (/.../stdlib-stacktrace-pls/dev/hello-broken/help
er.js:1:98)
at module.exports (/.../stdlib-stacktrace-pls/dev/hello-broken/func
tions/__main__.js:10:5)
...
Actual Outcome
$ lib .
Error: runtimeError is not defined