pub enum PlisskenError {
ConfigNotFound {
path: PathBuf,
},
ConfigParse {
message: String,
source: Option<Error>,
},
ConfigValidation {
message: String,
},
Parse {
language: String,
path: PathBuf,
line: Option<usize>,
message: String,
},
FileRead {
path: PathBuf,
message: String,
source: Error,
},
Template {
message: String,
source: Error,
},
OutputWrite {
path: PathBuf,
message: String,
source: Error,
},
CrossRef {
message: String,
},
Io {
context: String,
source: Error,
},
Discovery {
path: PathBuf,
message: String,
},
ManifestParse {
path: PathBuf,
message: String,
},
}Expand description
The primary error type for plissken-core operations.
This enum covers all error categories that can occur during parsing, rendering, and configuration handling.
Variants§
ConfigNotFound
Configuration file not found at the expected path.
ConfigParse
Failed to parse configuration file.
Fields
ConfigValidation
Configuration validation failed.
Parse
Failed to parse a source file.
Fields
FileRead
Failed to read a source file.
Fields
Template
Template rendering failed.
OutputWrite
Failed to write output file.
Fields
CrossRef
Cross-reference resolution failed.
Io
Generic IO error with context.
Fields
Discovery
Module discovery failed.
ManifestParse
Failed to parse manifest file (Cargo.toml or pyproject.toml).
Implementations§
Source§impl PlisskenError
impl PlisskenError
Sourcepub fn rust_parse(path: impl Into<PathBuf>, message: impl Into<String>) -> Self
pub fn rust_parse(path: impl Into<PathBuf>, message: impl Into<String>) -> Self
Create a parse error for a Rust file.
Sourcepub fn rust_parse_at(
path: impl Into<PathBuf>,
line: usize,
message: impl Into<String>,
) -> Self
pub fn rust_parse_at( path: impl Into<PathBuf>, line: usize, message: impl Into<String>, ) -> Self
Create a parse error for a Rust file with line number.
Sourcepub fn python_parse(
path: impl Into<PathBuf>,
message: impl Into<String>,
) -> Self
pub fn python_parse( path: impl Into<PathBuf>, message: impl Into<String>, ) -> Self
Create a parse error for a Python file.
Sourcepub fn python_parse_at(
path: impl Into<PathBuf>,
line: usize,
message: impl Into<String>,
) -> Self
pub fn python_parse_at( path: impl Into<PathBuf>, line: usize, message: impl Into<String>, ) -> Self
Create a parse error for a Python file with line number.
Sourcepub fn config_not_found(path: impl Into<PathBuf>) -> Self
pub fn config_not_found(path: impl Into<PathBuf>) -> Self
Create a config not found error.
Trait Implementations§
Source§impl Debug for PlisskenError
impl Debug for PlisskenError
Source§impl Display for PlisskenError
impl Display for PlisskenError
Source§impl Error for PlisskenError
impl Error for PlisskenError
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
use the Display impl or to_string()