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

[TIMOB-14098] Fleshed out error reporting and made it work on node 0.8.x #212

Merged
merged 1 commit into from
Jun 5, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/CodeProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ function run(sourceInformation, options, plugins, logger, callback) {
options = options || {};
plugins = plugins || {};

Runtime.setLogger(logger);

try {
Runtime.setLogger(logger);

init(sourceInformation, options, plugins);

Runtime.on('enteredFile', function(e) {
Expand All @@ -282,8 +282,12 @@ function run(sourceInformation, options, plugins, logger, callback) {
}

finalize();

Runtime.log('info', 'Generating results');
Runtime.fireEvent('projectProcessingEnd', 'Project processing complete');
generateResultsPages(options.outputFormat, Runtime.options.resultsPath, Runtime.options.resultsTheme, callback);
} catch(e) {
if (e instanceof RangeError && e.message === 'Maximum call stack size exceeded') {
if (e.message === 'Maximum call stack size exceeded') {
console.error('node.js maximum call stack size exceeded. Increasing the stack size may allow the project to be fully analyzed');
} else {
console.error('Internal error ' + e.message + '. Please file a bug report at http://jira.appcelerator.org/');
Expand All @@ -293,10 +297,6 @@ function run(sourceInformation, options, plugins, logger, callback) {
}
}

Runtime.log('info', 'Generating results');
Runtime.fireEvent('projectProcessingEnd', 'Project processing complete');
generateResultsPages(options.outputFormat, Runtime.options.resultsPath, Runtime.options.resultsTheme, callback);

return results;
}

Expand Down