Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Add Missing Error-Handling #12

Closed
wants to merge 1 commit into from
Closed

Conversation

xjamundx
Copy link

Currently when you try to enrouten a file that has some bad JavaScript, you get a pretty measily error message:
[ReferenceError: server is not defined]

With this change you get a message similar to the message one would get with node.js:

ReferenceError: server is not defined
    at Object.<anonymous> (/Users/jamuferguson/dev/paypal/8ballUI/controllers/extendSession.js:26:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /Users/jamuferguson/dev/paypal/8ballUI/node_modules/kraken-js/node_modules/express-enrouten/index.js:85:35
    at Array.forEach (native)
    at Object.withRoutes (/Users/jamuferguson/dev/paypal/8ballUI/node_modules/kraken-js/node_modules/express-enrouten/index.js:83:41)

Current Error Handling:
`[ReferenceError: server is not defined]`

With this change:
```
ReferenceError: server is not defined
    at Object.<anonymous> (/Users/jamuferguson/dev/paypal/8ballUI/controllers/extendSession.js:26:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /Users/jamuferguson/dev/paypal/8ballUI/node_modules/kraken-js/node_modules/express-enrouten/index.js:85:35
    at Array.forEach (native)
    at Object.withRoutes (/Users/jamuferguson/dev/paypal/8ballUI/node_modules/kraken-js/node_modules/express-enrouten/index.js:83:41)
```
@xjamundx
Copy link
Author

This may or may not be something that you want. If you can point me to where in kraken the error is currently being handled we can probably fix the problem just in that location.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant