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

console.log(not_existing_object) #3972

Closed
gavrilovmilos opened this issue Nov 22, 2015 · 3 comments
Closed

console.log(not_existing_object) #3972

gavrilovmilos opened this issue Nov 22, 2015 · 3 comments
Labels
invalid Issues and PRs that are invalid.

Comments

@gavrilovmilos
Copy link

I have this piece of code:

function (req, uiRes) {
    console.log(res) //code that comes after this line is never executed, no errors in console
    console.log("something")

    client.put('/something', someJSON, function(err, res, body) {...})
}

In the second line I tried to log the object 'res' that is not visible in the context. Strange thing is that the code that follows that line is never executed and there are no errors in console.

@ChALkeR
Copy link
Member

ChALkeR commented Nov 22, 2015

Most likely you catch the error somewhere.
Try this:

  1. Throw an error manually instead of console.log and check if that gets catched.
  2. Create a complete and reproducible testcase that doesn't depend on thirdparty modules.

@ChALkeR ChALkeR added the question Issues that look for answers. label Nov 22, 2015
@silverwind
Copy link
Contributor

Got a standalone example?

@gavrilovmilos
Copy link
Author

Aa yes, sorry, you were right, there is express error handler around it. Everything works fine. Thanks.

@ChALkeR ChALkeR added invalid Issues and PRs that are invalid. and removed question Issues that look for answers. labels Nov 23, 2015
This was referenced Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid.
Projects
None yet
Development

No branches or pull requests

3 participants