#!/usr/bin/env python3
"""The one base class every error this library raises on purpose shares.
The modules each define their own exception, and each keeps the standard
base that makes it behave where it is caught today: Malformed is still a
ValueError, Reached is still a RuntimeError, Declined is still a plain
Exception. What was missing was a name for "this library refused", so a
caller that does not care which refusal could catch one thing instead of
six - and a bug (TypeError, KeyError) could keep falling through, which
is what distinguishes a refusal from a defect.
Standard library only. Nothing here reads the network or the wall clock.
"""
from __future__ import annotations
[docs]class FleetmeshError(Exception):
"""Base of every exception fleetmesh_core raises deliberately.
Subclasses add it beside their existing base (class Malformed(
FleetmeshError, ValueError)) so no `except ValueError` anywhere stops
matching. Catching FleetmeshError means "the library declined or could
not parse"; anything else escaping is a defect to be fixed, not caught.
"""