Draft Inverse Bloom Filter
This commit is contained in:
@@ -52,7 +52,7 @@ export class Bytes {
|
||||
public static fromBase64(base64: string): Bytes {
|
||||
// If the Base64 is invalid, throw an error.
|
||||
if (!isBase64(base64)) {
|
||||
throw new Error('Invalid base64 string');
|
||||
throw new Error(`Cannot decode invalid base64 '${base64}'`);
|
||||
}
|
||||
|
||||
return new this(base64ToBin(base64));
|
||||
@@ -96,7 +96,7 @@ export class Bytes {
|
||||
public static fromHex(hex: string): Bytes {
|
||||
// If the hex is invalid, throw an error.
|
||||
if (!isHex(hex)) {
|
||||
throw new Error('Invalid hexidecimal string');
|
||||
throw new Error(`Cannot decode invalid hex '${hex}'`);
|
||||
}
|
||||
|
||||
return new this(hexToBin(hex));
|
||||
|
||||
Reference in New Issue
Block a user