pub enum ParseError {
IoError {
path: PathBuf,
source: Error,
},
FileTooLarge {
path: PathBuf,
max_size: usize,
actual_size: usize,
},
SyntaxError {
file: String,
line: usize,
column: usize,
message: String,
},
GraphError(String),
InvalidConfig(String),
UnsupportedFeature {
file: String,
feature: String,
},
}Expand description
Errors that can occur during Python parsing
Variants§
IoError
I/O error reading a file
FileTooLarge
File exceeds maximum size limit
SyntaxError
Python syntax error
GraphError(String)
Error from graph database operations
InvalidConfig(String)
Invalid parser configuration
UnsupportedFeature
Unsupported Python language feature
Implementations§
Source§impl ParseError
impl ParseError
Sourcepub fn io_error(path: impl Into<PathBuf>, source: Error) -> Self
pub fn io_error(path: impl Into<PathBuf>, source: Error) -> Self
Create an IoError from a path and io::Error
Sourcepub fn file_too_large(
path: impl Into<PathBuf>,
max_size: usize,
actual_size: usize,
) -> Self
pub fn file_too_large( path: impl Into<PathBuf>, max_size: usize, actual_size: usize, ) -> Self
Create a FileTooLarge error
Sourcepub fn syntax_error(
file: impl Into<String>,
line: usize,
column: usize,
message: impl Into<String>,
) -> Self
pub fn syntax_error( file: impl Into<String>, line: usize, column: usize, message: impl Into<String>, ) -> Self
Create a SyntaxError
Sourcepub fn graph_error(message: impl Into<String>) -> Self
pub fn graph_error(message: impl Into<String>) -> Self
Create a GraphError
Sourcepub fn invalid_config(message: impl Into<String>) -> Self
pub fn invalid_config(message: impl Into<String>) -> Self
Create an InvalidConfig error
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ParseError
impl !RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl !UnwindSafe for ParseError
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 more