mirror of
https://github.com/bower/bower.git
synced 2026-04-24 03:00:19 -04:00
Use fstream stack for more meaningful stack traces.
This commit is contained in:
@@ -56,11 +56,11 @@ StandardRenderer.prototype.error = function (err) {
|
||||
// Print trace if verbose, the error has no code
|
||||
// or if the error is a node error
|
||||
if (this._config.verbose || !err.code || err.errno) {
|
||||
// TODO: In some situations, err.stack is meaningless
|
||||
// Investigate why and find alternatives
|
||||
/*jshint camelcase:false*/
|
||||
str = '\nStack trace:\n'.yellow;
|
||||
str += (err.stack || 'N/A') + '\n';
|
||||
str += (err.fstream_stack ? err.fstream_stack.join('\n') : err.stack || 'N/A') + '\n';
|
||||
str += '\nConsole trace:\n'.yellow;
|
||||
/*jshint camelcase:true*/
|
||||
|
||||
this._write(process.stderr, str);
|
||||
console.trace();
|
||||
|
||||
Reference in New Issue
Block a user