We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a001590 commit c4818d9Copy full SHA for c4818d9
src/long.ts
@@ -347,7 +347,9 @@ export class Long extends BSONValue {
347
// doing this check outside of recursive function so cleanedStr value is consistent
348
const result = Long.fromStringHelper(cleanedStr, unsigned, radix, true);
349
if (result.toString(radix).toLowerCase() !== cleanedStr.toLowerCase()) {
350
- throw new BSONError(`Input: ${str} is not representable as a Long`);
+ throw new BSONError(
351
+ `Input: ${str} is not representable as ${result.unsigned ? 'an unsigned' : 'a signed'} 64-bit Long with radix: ${radix}`
352
+ );
353
}
354
return result;
355
0 commit comments