Browse Source

EAGLESIX-5472: fix misc while bug hunting - fixes #62

Kyle P Davis 11 years ago
parent
commit
36229d2272

+ 1 - 1
lib/matcher/ListOfMatchExpression.js

@@ -105,7 +105,7 @@ proto.equivalent = function equivalent(other){
 	if (this._matchType !== other._matchType)
 		return false;
 
-	var realOther = new ListOfMatchExpression(other);
+	var realOther = other; //NOTE: the JS does not need to static_cast like the C++ does
 
 	if (this._expressions.length !== realOther._expressions.length)
 		return false;

+ 2 - 2
lib/matcher/MatchExpressionParser.js

@@ -731,11 +731,11 @@ proto._parseSubField = function _parseSubField(context, andSoFar, name, element,
 		var x = "Temporary value until Geo fns implimented.";
 		return this.expressionParserGeoCallback(name, x, context);
 	default:
-		return {code:ErrorCodes.BAD_VALUE, description:"not handled: " + element};
+		return {code:ErrorCodes.BAD_VALUE, description:"not handled: " + JSON.stringify(element)};
 	} // end switch
 
 
-	return {code:ErrorCodes.BAD_VALUE, description:"not handled: " + element};
+	return {code:ErrorCodes.BAD_VALUE, description:"not handled: " + JSON.stringify(element)};
 };
 
 /**

+ 1 - 1
lib/matcher/Matcher2.js

@@ -16,7 +16,7 @@ var Matcher2 = module.exports = function Matcher2(pattern, nested){
 	this.parser = new MatchExpressionParser();
 	var result = this.parser.parse(pattern);
 	if (result.code !== ErrorCodes.OK)
-		return {code:16810, description:"bad query: " + result};
+		return {code:16810, description:"bad query: " + JSON.stringify(result)};
 	this._expression = result.result;
 }, klass = Matcher2, proto = klass.prototype;