1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum MiniplanError {
8 #[error("failed to parse PDDL: {0}")]
10 Parse(String),
11
12 #[error("unsupported PDDL requirement: {0}")]
14 Unsupported(String),
15
16 #[error("type mismatch: {0}")]
18 TypeMismatch(String),
19
20 #[error("grounding error: {0}")]
22 Ground(String),
23
24 #[error("search limit reached: {0}")]
26 SearchLimit(String),
27
28 #[error("no plan found")]
30 NoPlan,
31
32 #[error("planner '{planner}' cannot handle this task; missing capabilities: {missing:?}")]
34 IncapablePlanner {
35 planner: String,
37 missing: String,
39 },
40
41 #[error("I/O error: {0}")]
43 Io(#[from] std::io::Error),
44
45 #[error("invalid planner name: {0}")]
47 InvalidPlanner(String),
48
49 #[error("invalid heuristic name: {0}")]
51 InvalidHeuristic(String),
52
53 #[error("bidirectional search does not support operators with conditional effects")]
55 UnsupportedConditionalEffects,
56}