pub enum ShapeError {
Show 22 variants
StructuredParse(Box<StructuredParseError>),
ParseError {
message: String,
location: Option<SourceLocation>,
},
LexError {
message: String,
location: Option<SourceLocation>,
},
TypeError(String),
SemanticError {
message: String,
location: Option<SourceLocation>,
},
RuntimeError {
message: String,
location: Option<SourceLocation>,
},
VMError(String),
ControlFlow(Arc<dyn Any + Sync + Send>),
PatternError {
message: String,
pattern_name: Option<String>,
},
DataError {
message: String,
symbol: Option<String>,
timeframe: Option<String>,
},
ModuleError {
message: String,
module_path: Option<PathBuf>,
},
IoError(Error),
SimulationError {
message: String,
simulation_name: Option<String>,
},
DataProviderError {
message: String,
provider: Option<String>,
},
TestError {
message: String,
test_name: Option<String>,
},
ConfigError {
message: String,
},
StreamError {
message: String,
stream_name: Option<String>,
},
CacheError {
message: String,
},
AlignmentError {
message: String,
ids: Vec<String>,
},
MultiError(Vec<ShapeError>),
Interrupted {
snapshot_hash: Option<String>,
},
Custom(String),
}Expand description
The main error type for Shape operations
Variants§
StructuredParse(Box<StructuredParseError>)
Structured parse errors (preferred - provides rich context for rendering)
ParseError
Legacy parser errors (kept for compatibility)
LexError
Lexer errors
TypeError(String)
Type system errors
SemanticError
Semantic analysis errors
RuntimeError
Runtime evaluation errors
VMError(String)
VM execution errors
ControlFlow(Arc<dyn Any + Sync + Send>)
Control flow errors (break/continue/return)
PatternError
Pattern matching errors
DataError
Data errors
ModuleError
Module loading errors
IoError(Error)
I/O errors
SimulationError
Simulation execution errors
DataProviderError
Data provider errors
TestError
Test framework errors
ConfigError
Configuration errors
StreamError
Stream processing errors
CacheError
Cache errors
AlignmentError
Alignment errors
MultiError(Vec<ShapeError>)
Multiple errors collected during analysis
Interrupted
Execution interrupted by Ctrl+C (with optional snapshot hash)
Custom(String)
Generic errors with custom messages
Implementations§
Source§impl ShapeError
impl ShapeError
Sourcepub fn format_with_source(&self) -> String
pub fn format_with_source(&self) -> String
Format the error with source location, hints, and notes (Rust-style)
Sourcepub fn error_code(&self) -> Option<ErrorCode>
pub fn error_code(&self) -> Option<ErrorCode>
Try to determine an error code based on the error type and message
Trait Implementations§
Source§impl Clone for ShapeError
Implement Clone manually since thiserror doesn’t derive it
impl Clone for ShapeError
Implement Clone manually since thiserror doesn’t derive it
Source§fn clone(&self) -> ShapeError
fn clone(&self) -> ShapeError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShapeError
impl Debug for ShapeError
Source§impl Display for ShapeError
impl Display for ShapeError
Source§impl Error for ShapeError
impl Error for ShapeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error<Rule>> for ShapeError
Convert from pest::error::Error to ShapeError for parser Rule
impl From<Error<Rule>> for ShapeError
Convert from pest::error::Error to ShapeError for parser Rule
Source§impl From<Error> for ShapeError
Convert from anyhow::Error to ShapeError
impl From<Error> for ShapeError
Convert from anyhow::Error to ShapeError
Source§fn from(err: Error) -> ShapeError
fn from(err: Error) -> ShapeError
Source§impl From<Error> for ShapeError
Convert from serde_json::Error to ShapeError
impl From<Error> for ShapeError
Convert from serde_json::Error to ShapeError
Source§fn from(err: Error) -> ShapeError
fn from(err: Error) -> ShapeError
Source§impl From<Error> for ShapeError
impl From<Error> for ShapeError
Source§fn from(source: Error) -> ShapeError
fn from(source: Error) -> ShapeError
Auto Trait Implementations§
impl Freeze for ShapeError
impl !RefUnwindSafe for ShapeError
impl Send for ShapeError
impl Sync for ShapeError
impl Unpin for ShapeError
impl UnsafeUnpin for ShapeError
impl !UnwindSafe for ShapeError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.