--- a/nashorn/test/script/assert.js Wed Oct 09 17:53:22 2013 +0200
+++ b/nashorn/test/script/assert.js Thu Oct 10 11:48:56 2013 +0200
@@ -61,3 +61,22 @@
}
}
});
+
+Object.defineProperty(this, "printError", {
+ configuable: true,
+ enumerable: false,
+ writable: true,
+ value: function (e) {
+ var msg = e.message;
+ var str = e.name + ':';
+ if (e.lineNumber > 0) {
+ str += e.lineNumber + ':';
+ }
+ if (e.columnNumber > 0) {
+ str += e.columnNumber + ':';
+ }
+ str += msg.substring(msg.indexOf(' ') + 1);
+ print(str);
+ }
+});
+