QueryParser: Unsupported value type conversion should not KDL.

Enhance the warning message and return a more relevant error code.

Fixes #19017.

Change-Id: I13d01ce206a27e5c9a35debc8081219422bfb10a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8136
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Augustin Cavalier
2024-08-26 18:25:11 +00:00
committed by waddlesplash
parent fe514848c2
commit be52613c12
+3 -4
View File
@@ -630,10 +630,9 @@ Equation<QueryPolicy>::ConvertValue(type_code type)
fSize = sizeof(double);
break;
default:
QUERY_FATAL("query value conversion to 0x%x requested!\n",
(int)type);
// should we fail here or just do a safety int32 conversion?
return B_ERROR;
QUERY_INFORM("query attribute '%s': unsupported value conversion to 0x%x requested!\n",
fAttribute, (int)type);
return B_BAD_TYPE;
}
fType = type;