flow_expression_parser/
error.rs

1use thiserror::Error;
2
3/// Error type for the flow expression parser.
4#[derive(Error, Debug, Clone, PartialEq)]
5#[non_exhaustive]
6pub enum ParserError {
7  /// Component id is not a fully qualified name with a namespace.
8  #[error("Component id '{0}' is not a fully qualified name with a namespace")]
9  ComponentIdError(String),
10
11  /// Default was requested when none present.
12  #[error("Invalid connection target syntax: '{0}': {1}")]
13  ConnectionTargetSyntax(String, String),
14
15  /// Default was requested when none present.
16  #[error("Invalid connection definition syntax: '{0}'")]
17  ConnectionDefinitionSyntax(String),
18
19  /// Whatever was passed in as an operation's port isn't valid.
20  #[error("Invalid input/output port syntax: '{0}'")]
21  PortSyntax(String),
22
23  /// Ambiguous reference in connection shorthand.
24  #[error("No suitable default found for port in : {0}")]
25  NoDefaultPort(String),
26
27  /// Ambiguous port in connection shorthand.
28  #[error("No suitable default found for reference in : {0}")]
29  NoDefaultReference(String),
30
31  /// Error parsing or serializing Sender data.
32  #[error("Error parsing or serializing Sender data: {0}")]
33  InvalidSenderData(String),
34
35  /// Error occurred parsing a flow expression.
36  #[error("Could not parse string into a FlowExpression '{0}'")]
37  FlowExpressionParse(String),
38}