Skip to main content

sim_lib_topology/
error.rs

1//! Topology engine error and validation-diagnostic constructors.
2
3use sim_kernel::{Error, Symbol};
4
5/// Builds a topology validation error naming the graph, context, and message.
6pub fn validation_error(
7    graph: &Symbol,
8    context: impl AsRef<str>,
9    message: impl AsRef<str>,
10) -> Error {
11    Error::Eval(format!(
12        "topology validation error in {graph}: {}: {}",
13        context.as_ref(),
14        message.as_ref()
15    ))
16}