I want to love Node. I really do. However, I have a really big beef with the passive-aggressive way my codebase fails when you do something as egregious as reference an undefined variable form within a module.Every time the codebase I'm working on fails, I'm filled with dread because any actual output indicating where the real problem is was swallowed. Instead, I'll get a silent failure or--best case scenario--an error that a downstream referenced property or method on an object is undefined. The root cause is always an issue with the "undefined" object's module or one of its subordinate modules. For example, if module A loads module B and B has a typo, the error that bubbles up is that a reference to b.propertyname in module A is undefined, not that B had a syntax or undefined reference error.I'd provide a code example, but I can't reproduce the problem on the small scale. This leads me to believe there is something about this codebase that is causing it to suppress errors instead of bubbling them up.The original author and other team members don't have any idea what could be causing the problem. Can anyone here tell me why a Node application would be quietly suppressing errors in some modules?We're running 5.9.0 on Apple and Ubuntu.
Submitted April 06, 2016 at 12:57AM by tiziojoe
No comments:
Post a Comment