mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 708498 - TPS logging improvements; r=rnewman
This commit is contained in:
parent
9d6d811243
commit
dde864d417
@ -101,14 +101,19 @@ var Logger =
|
||||
},
|
||||
|
||||
AssertTrue: function(bool, msg, showPotentialError) {
|
||||
if (!bool) {
|
||||
let message = msg;
|
||||
if (showPotentialError && this._potentialError) {
|
||||
message += "; " + this._potentialError;
|
||||
this._potentialError = null;
|
||||
}
|
||||
throw("ASSERTION FAILED! " + message);
|
||||
if (bool) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (showPotentialError && this._potentialError) {
|
||||
msg += "; " + this._potentialError;
|
||||
this._potentialError = null;
|
||||
}
|
||||
throw("ASSERTION FAILED! " + msg);
|
||||
},
|
||||
|
||||
AssertFalse: function(bool, msg, showPotentialError) {
|
||||
return this.AssertTrue(!bool, msg, showPotentialError);
|
||||
},
|
||||
|
||||
AssertEqual: function(val1, val2, msg) {
|
||||
@ -126,7 +131,7 @@ var Logger =
|
||||
var now = new Date()
|
||||
this.write(now.getFullYear() + "-" + (now.getMonth() < 9 ? '0' : '') +
|
||||
(now.getMonth() + 1) + "-" +
|
||||
(now.getDate() < 9 ? '0' : '') + (now.getDate() + 1) + " " +
|
||||
(now.getDate() < 10 ? '0' : '') + (now.getDate()) + " " +
|
||||
(now.getHours() < 10 ? '0' : '') + now.getHours() + ":" +
|
||||
(now.getMinutes() < 10 ? '0' : '') + now.getMinutes() + ":" +
|
||||
(now.getSeconds() < 10 ? '0' : '') + now.getSeconds() + " " +
|
||||
|
@ -148,7 +148,7 @@ var TPS =
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
this.DumpError("Exception caught: " + e);
|
||||
this.DumpError("Exception caught: " + Utils.exceptionStr(e));
|
||||
return;
|
||||
}
|
||||
},
|
||||
@ -479,7 +479,7 @@ var TPS =
|
||||
this._currentAction++;
|
||||
}
|
||||
catch(e) {
|
||||
this.DumpError("Exception caught: " + e);
|
||||
this.DumpError("Exception caught: " + Utils.exceptionStr(e));
|
||||
return;
|
||||
}
|
||||
this.RunNextTestAction();
|
||||
@ -538,7 +538,7 @@ var TPS =
|
||||
this._currentAction = 0;
|
||||
}
|
||||
catch(e) {
|
||||
this.DumpError("Exception caught: " + e);
|
||||
this.DumpError("Exception caught: " + Utils.exceptionStr(e));
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user