Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
[BUG #8960] Removed assertion error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
wittemann committed Feb 25, 2015
1 parent a068a25 commit d224aeb
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions framework/source/class/qx/core/Assert.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ qx.Class.define("qx.core.Assert",
{
statics :
{
__logError : true,

/**
* Assert that the condition evaluates to <code>true</code>. An
* {@link AssertionError} is thrown if otherwise.
Expand Down Expand Up @@ -67,19 +65,9 @@ qx.Class.define("qx.core.Assert",
}
var errorMsg = "Assertion error! " + fullComment;

if (qx.Class.getByName("qx.core.AssertionError"))
{
var err = new qx.core.AssertionError(comment, msg);
if (this.__logError) {
qx.Class.error(errorMsg + "\n Stack trace: \n" + err.getStackTrace());
}
throw err;
}
else
{
if (this.__logError) {
qx.Class.error(errorMsg);
}
if (qx.Class.getByName("qx.core.AssertionError")) {
throw new qx.core.AssertionError(comment, msg);
} else {
throw new Error(errorMsg);
}
},
Expand Down Expand Up @@ -431,12 +419,9 @@ qx.Class.define("qx.core.Assert",
var error;

try {
this.__logError = false;
callback();
} catch(ex) {
error = ex;
} finally {
this.__logError = true;
}

if (!error) {
Expand Down

0 comments on commit d224aeb

Please sign in to comment.