PackErrorclass
A packed file that cannot be read: it is not a packed file, it is cut short, it holds more than MAX_PACKED records, or it unpacks to more than MAX_PACKED_BYTES.
Import it
import { PackError } from "@johnmorrisdotca/chikyu-earth/catalogue";
Definition
class PackError
new PackError(message: string): PackError
Parameters
| Name | Type | Description |
|---|---|---|
message | string | What is wrong with the file, in a sentence. |
Members
| Name | Type | Description |
|---|---|---|
name | string | |
message | string | |
stack (optional) | string | undefined | |
cause (optional) | unknown |
Examples
import { PackError, unpackCatalogue } from "@johnmorrisdotca/chikyu-earth/catalogue";
try {
unpackCatalogue(new Uint8Array(4));
} catch (error) {
console.log(error instanceof PackError);
}trueWhat it prints (run when this page was built)