aboutsummaryrefslogtreecommitdiff
path: root/src/utility.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-11 14:41:02 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-11 14:41:02 -0700
commitbda161bc637e57c97f6d70e7b0fdb12469a07fd7 (patch)
tree20467fb5d6d49fa0e07bf633b52fdb6522fe0704 /src/utility.js
parent6dd1623b67f5195204805aa6ab0e2b0e07fd30d9 (diff)
print assertions to stderr
Diffstat (limited to 'src/utility.js')
-rw-r--r--src/utility.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utility.js b/src/utility.js
index 7d5e0970..42e8ede4 100644
--- a/src/utility.js
+++ b/src/utility.js
@@ -40,7 +40,7 @@ function dumpKeys(item) {
function assertEq(a, b) {
if (a !== b) {
- print('Stack: ' + new Error().stack);
+ printErr('Stack: ' + new Error().stack);
throw 'Should have been equal: ' + a + ' : ' + b;
}
return false;
@@ -50,7 +50,7 @@ function assertTrue(a, msg) {
if (!a) {
msg = 'Assertion failed: ' + msg;
print(msg);
- print('Stack: ' + new Error().stack);
+ printErr('Stack: ' + new Error().stack);
throw msg;
}
}