Lines Matching refs:msg
47 assert: function f(expr, msg){
50 ? (msg)=>{throw new Error(msg)}
55 f._(msg || "Assertion failed.");
61 affirm: function(expr, msg){
63 if(!this.toBool(expr)) throw new Error(msg || "Affirmation failed.");
68 mustThrow: function(f, msg){
72 if(!err) throw new Error(msg || "Expected exception.");
89 mustThrowMatching: function(f, filter, msg){
93 if(!err) throw new Error(msg || "Expected exception.");
99 throw new Error(msg || ("Filter rejected this exception: "+err.message));
105 throwIf: function(expr, msg){
107 if(this.toBool(expr)) throw new Error(msg || "throwIf() failed");
112 throwUnless: function(expr, msg){
114 if(!this.toBool(expr)) throw new Error(msg || "throwUnless() failed");