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

Should show stacktrace when exception is thrown #55

Closed
2 tasks done
sswaroopgupta opened this issue Nov 24, 2017 · 1 comment
Closed
2 tasks done

Should show stacktrace when exception is thrown #55

sswaroopgupta opened this issue Nov 24, 2017 · 1 comment

Comments

@sswaroopgupta
Copy link
Contributor

Expected behavior
Should show stacktrace when exception is thrown

Actual behavior

  • does not show the stack trace for throw 'Error'
throw 'Error2'; // generates an exception with a string value
throw 42;       // generates an exception with the value 42
throw true;     // generates an exception with the value true
  • Works for an assertion failure
  • Works for throw new Error('Unimplemented Step');

Version

Gauge version: 0.9.5.nightly-2017-11-23
Commit Hash: 51cfe8d

Plugins
-------
js (2.0.3.nightly-2017-11-23)
@BugDiver
Copy link
Member

@sguptatw That's not an issue with the plugin. It's the way how nodejs handle errors.
throw "Error" is not same as throw new Error("Error"). first one is a primitive, not an object. throwing a primitive will not capture any stack trace.

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

No branches or pull requests

2 participants