Base class for every GeoLeaf error — a native Error carrying structured context.
Beyond message, an instance holds a free-form context bag and an ISO-8601 timestamp
set at construction, so a caught error can be logged or serialised without the catch site
having to reconstruct where it came from. name is taken from the concrete constructor,
which is what makes the subclasses distinguishable after a JSON.stringify.
⚠️ code is declared here but only set by the subclasses — an instance of this base
class has code === undefined. Use getErrorCode, which falls back to
"UNKNOWN_ERROR", rather than reading the field directly.
Base class for every GeoLeaf error — a native
Errorcarrying structured context.Beyond
message, an instance holds a free-formcontextbag and an ISO-8601timestampset at construction, so a caught error can be logged or serialised without the catch site having to reconstruct where it came from.nameis taken from the concrete constructor, which is what makes the subclasses distinguishable after aJSON.stringify.⚠️
codeis declared here but only set by the subclasses — an instance of this base class hascode === undefined. Use getErrorCode, which falls back to"UNKNOWN_ERROR", rather than reading the field directly.Example