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

Add logging for handled errors in Preview #431

Merged
merged 1 commit into from
May 7, 2017

Conversation

nkt
Copy link
Contributor

@nkt nkt commented May 6, 2017

This change makes easier debugging.
Before this change you can't understand why and how did you get an error
2017-05-06_14-58-48
After merge, developer would be able to discover errors in console:
2017-05-06_15-00-51

@codecov-io
Copy link

codecov-io commented May 6, 2017

Codecov Report

Merging #431 into master will decrease coverage by 0.08%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #431      +/-   ##
==========================================
- Coverage   94.24%   94.16%   -0.09%     
==========================================
  Files          78       78              
  Lines        1113     1114       +1     
  Branches      246      246              
==========================================
  Hits         1049     1049              
- Misses         60       61       +1     
  Partials        4        4
Impacted Files Coverage Δ
src/rsg-components/Preview/Preview.js 50% <0%> (-1.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ccfb8e8...0cbd7d6. Read the comment docs.

Copy link
Member

@sapegin sapegin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

@@ -129,6 +129,9 @@ export default class Preview extends Component {
this.setState({
error: err.toString(),
});

// eslint-disable-next-line
console.error(err);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// eslint-disable-line no-console would be more explicit.

@nkt nkt force-pushed the fix/log-preview-errors branch from 8b90c24 to 0cbd7d6 Compare May 6, 2017 16:18
@sapegin sapegin merged commit 273203b into styleguidist:master May 7, 2017
@nkt nkt deleted the fix/log-preview-errors branch May 7, 2017 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants