Skip to content

Commit 6cb701b

Browse files
committed
add error message
1 parent 521088e commit 6cb701b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SqlString.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ SqlString.escapeId = function escapeId(val, forbidQualified) {
3434
if (QUALIFIED_ID_REGEXP.test(sqlString)) {
3535
return sqlString;
3636
} else {
37-
throw new TypeError();
37+
throw new TypeError(
38+
'raw sql reached ?? or escapeId but is not an identifier: ' +
39+
sqlString);
3840
}
3941
} else if (forbidQualified) {
4042
return '`' + String(val).replace(ID_GLOBAL_REGEXP, '``') + '`';

0 commit comments

Comments
 (0)