more descriptive errors
This commit is contained in:
parent
2f33871141
commit
e35d6c46c9
@ -62,7 +62,7 @@ importButton.onclick = async (ev) => {
|
||||
return;
|
||||
}
|
||||
if (files.length > 1) {
|
||||
throw new Error("unreachable: something went wrong !");
|
||||
throw new Error("unreachable: something went wrong ! files.length > 1");
|
||||
}
|
||||
const item = Vermiparous.de(await fetch(URL.createObjectURL(files[0])).then((x) => x.bytes()));
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ export class Vermiparous {
|
||||
while (idx < bytes.length) {
|
||||
buffer.push(bytes[idx]);
|
||||
if (buffer.length >= MAX_KW_LENGTH) {
|
||||
throw new Error("unreachable: something went wrong !");
|
||||
throw new Error("unreachable: something went wrong ! unrecognized action");
|
||||
}
|
||||
if (buffer.length < MIN_KW_LENGTH || !isKeyword(buffer)) {
|
||||
++idx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user