error
Stable error · Errors
Tier: stable · Kind: error · Topic: Errors
| Julia | Rust |
|---|---|
| not exported | Error |
Julia
Julia does not export this error.
Rust
pub enum Error {
Config(String),
Unimplemented(String),
Run(String),
}
Errors: refusals of a run config or schedule, and failed runs.
Example (refusal)
let mut bad = config.clone();
bad["schedule"]["alg"] = json!("Bogus");
let rc = RunConfig::from_value(&bad).unwrap();
match RunSpec::<f64>::new(&rc, (0.0, 2.0), None) {
Err(Error::Config(msg)) => assert!(msg.contains("Bogus")),
other => panic!("expected a config error, got {:?}", other.map(|_| ())),
}