Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Error Logging #56

Closed
hoodsy opened this issue Nov 8, 2015 · 3 comments
Closed

Error Logging #56

hoodsy opened this issue Nov 8, 2015 · 3 comments

Comments

@hoodsy
Copy link

hoodsy commented Nov 8, 2015

I love using React as the view engine with express, but I have found debugging to be an issue.

When I encounter basic errors with React (in render() generally) I am unable to see the error message. I can use logging statements in my components if my component will compile, but when it doesn't compile I receive no error message.

Is there any way to expose this? It would be very useful for debugging. My application is very simple for the time being, and it would be great to get this in sooner rather than later.

@barretts
Copy link

👍 the debugging steps I've learned so far to track down this issue is starting to wrap render return in try/catch in various place. I'd love to see a more expected error handling behavior.

@zpao
Copy link
Member

zpao commented Feb 9, 2016

This view engine does what is expected AFAIK which is to return the error and let express handle it. You should have some sort of error logging enabled. One example is https://github.com/expressjs/errorhandler which will show the error in the browser, which works for both transform errors and errors thrown from React.

@zpao
Copy link
Member

zpao commented Jun 6, 2016

I'm going to close out since I think this actually works right and I haven't heard anything back. We can reopen if I'm wrong.

@zpao zpao closed this as completed Jun 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants