Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Print stack trace when possible on `prepare` error #139

wants to merge 1 commit into


None yet
2 participants

alFReD-NSH commented Mar 12, 2014

When I got the error #138, it took me a little time to find the source of the error. This would be very helpful for developers of this project.

Before it used to be like this:

alfred@alFolio:~/repos/carpool/client$ cordova prepare
[ReferenceError: a is not defined]

Now it's like this:

alfred@alFolio:~/repos/carpool/client$ cordova prepare
ReferenceError: a is not defined
    at Object.ConfigParser.getPreference (/home/alfred/repos/cordova-cli/src/ConfigParser.js:88:23)
    at Object.module.exports.findOrientationPreference (/home/alfred/repos/cordova-cli/src/metadata/android_parser.js:52:26)
    at Object.module.exports.update_from_config (/home/alfred/repos/cordova-cli/src/metadata/android_parser.js:84:36)
    at Object.module.exports.update_project (/home/alfred/repos/cordova-cli/src/metadata/android_parser.js:167:18)
    at /home/alfred/repos/cordova-cli/src/prepare.js:113:31
    at _fulfilled (/home/alfred/repos/cordova-cli/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/home/alfred/repos/cordova-cli/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/home/alfred/repos/cordova-cli/node_modules/q/q.js:760:13)
    at /home/alfred/repos/cordova-cli/node_modules/q/q.js:821:14
    at flush (/home/alfred/repos/cordova-cli/node_modules/q/q.js:108:17)

agrieve commented Mar 12, 2014

Thanks for tracking this down. I think a better fix is to just delete the fail() clause. I tested that doing so shows the stacktrace, and so have gone with that instead.

@asfgit asfgit closed this in 2a9ef82 Mar 12, 2014


alFReD-NSH commented Mar 13, 2014

Yes, I wanted to mention it's better to crash the process with a non-zero code, but I forgot :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment