now handles exceptions that aren't Errors

This commit is contained in:
csausdev
2010-12-11 21:55:21 +11:00
parent c2f9ccce73
commit c870289928
2 changed files with 20 additions and 3 deletions

View File

@@ -279,9 +279,13 @@ module.exports = function (fileSystem, standardOutput, configPaths) {
this.startTime = new Date();
this.categoryName = categoryName;
this.message = message;
this.exception = exception;
this.level = level;
this.logger = logger;
if (exception && exception.message && exception.name) {
this.exception = exception;
} else if (exception) {
this.exception = new Error(exception);
}
}
/**