Permalink
Browse files

adding proper error handling for benchmark and benchtable suites

  • Loading branch information...
caridy committed Dec 11, 2012
1 parent 065b6c1 commit 8bc8b7474a2ad10ed723d7f0a09263dcc03d731f
Showing with 15 additions and 3 deletions.
  1. +15 −3 lib/app/commands/benchmark.js
@@ -1,4 +1,4 @@
-/*jslint node:true, nomen:true */
+/*jslint node:true, nomen:true, stupid: true */
'use strict';
var libpath = require('path'),
@@ -47,7 +47,13 @@ function getYUIInstance(store, testName) {
});
suite.on('cycle', function (event) {
- util.log(String(event.target));
+ if (!event.target.error) {
+ util.log(String(event.target));
+ }
+ });
+
+ suite.on('error', function (event) {
+ util.error(String(event.target) + String(event.target.error));
});
suite.on('complete', function (event) {
@@ -63,7 +69,13 @@ function getYUIInstance(store, testName) {
});
suiteTable.on('cycle', function (event) {
- util.log(String(event.target));
+ if (!event.target.error) {
+ util.log(String(event.target));
+ }
+ });
+
+ suiteTable.on('error', function (event) {
+ util.error(String(event.target) + String(event.target.error));
});
suiteTable.on('complete', function (event) {

0 comments on commit 8bc8b74

Please sign in to comment.