1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Error types for parsing, grounding, and search operations.
use thiserror::Error;
/// Errors that can occur during planning operations.
#[derive(Debug, Error)]
pub enum MiniplanError {
/// Failed to parse PDDL input.
#[error("failed to parse PDDL: {0}")]
Parse(String),
/// A PDDL requirement is not supported.
#[error("unsupported PDDL requirement: {0}")]
Unsupported(String),
/// A type mismatch was detected.
#[error("type mismatch: {0}")]
TypeMismatch(String),
/// An error occurred during grounding.
#[error("grounding error: {0}")]
Ground(String),
/// A search limit was reached.
#[error("search limit reached: {0}")]
SearchLimit(String),
/// No plan was found.
#[error("no plan found")]
NoPlan,
/// The planner cannot handle the given task.
#[error("planner '{planner}' cannot handle this task; missing capabilities: {missing:?}")]
IncapablePlanner {
/// Name of the planner.
planner: String,
/// Description of missing capabilities.
missing: String,
},
/// An I/O error occurred.
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
/// The planner name is not registered.
#[error("invalid planner name: {0}")]
InvalidPlanner(String),
/// The heuristic name is not registered.
#[error("invalid heuristic name: {0}")]
InvalidHeuristic(String),
/// Bidirectional search doesn't support conditional effects.
#[error("bidirectional search does not support operators with conditional effects")]
UnsupportedConditionalEffects,
}