#[non_exhaustive]pub enum Error {
Io {
path: PathBuf,
source: Error,
},
Config {
path: PathBuf,
source: Error,
},
UnknownRelationSource {
external: String,
from: String,
},
InvalidExternalId {
id: String,
},
ExternalKindIsSurveyed {
id: String,
kind: String,
surveyed: String,
},
DuplicateId {
id: String,
first: String,
second: String,
},
UnknownThemeKind {
kind: String,
have: String,
},
UnknownTopLevel {
path: PathBuf,
entry: String,
known: String,
},
PinMismatch {
path: PathBuf,
pinned: String,
running: String,
},
NoFrontend {
root: PathBuf,
},
Frontend {
frontend: String,
source: Box<dyn Error + Send + Sync + 'static>,
},
}Expand description
Anything the core, a front-end, or the config can get wrong.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
Config
asbuilt.toml did not parse or had a key the schema rejects.
UnknownRelationSource
An [[externals.relations]] from that names no generated
element and no sibling external. A typo here is an error, not a
diagram that quietly omits an edge.
InvalidExternalId
An [[externals]] id that is not a LikeC4 identifier as written.
ExternalKindIsSurveyed
An [[externals]] kind that is one the survey generates;
surveyed lists them.
DuplicateId
Two model ids that become the same LikeC4 identifier once -
maps to _ and a leading digit is prefixed.
UnknownThemeKind
A [theme] key naming an element kind the surveyed model does not
have; a typo would otherwise style nothing, silently.
UnknownTopLevel
A top-level asbuilt.toml entry that is neither one of asbuilt’s
own tables nor a front-end’s: [rsut], [[external]] for
[[externals]], or a key such as title = ... that belongs under
[docs]. It would otherwise be ignored, silently. entry is
written as it appears in the file.
PinMismatch
asbuilt = "X.Y.Z" pins a release other than the one running. A
survey is only meaningful against the release that wrote the
model, so every command stops here rather than report the other
release’s output as drift.
NoFrontend
No front-end recognized the root.
Frontend
A front-end failed; the source says which file or module.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()