Skip to main content

ParseError

Type Alias ParseError 

Source
pub type ParseError = GettextError;
Expand description

Backwards-compatible alias for code paths (and tests) that still spell the parser error as ParseError. Both names point at the same enum.

Aliased Type§

pub enum ParseError {
    InvalidFormat(String),
    TranslationNotFound {
        key: String,
        context: Option<String>,
    },
    PathRequired,
    InvalidPath(String),
    InvalidInput(String),
    FileLocked {
        path: PathBuf,
    },
    Io(Error),
}

Variants§

§

InvalidFormat(String)

PO format error surfaced by the parser.

§

TranslationNotFound

Lookup failed: no entry with the given key exists.

Fields

§context: Option<String>
§

PathRequired

A tool was called without path in dynamic mode, or without a configured default file in single-file mode.

§

InvalidPath(String)

Path validation rejected the caller-supplied path (traversal, outside base directory, etc.).

§

InvalidInput(String)

Generic invalid-argument error from the store or a tool handler.

§

FileLocked

Another process (likely Poedit or a translator’s editor) holds an exclusive lock on the file we tried to write.

Fields

§path: PathBuf
§

Io(Error)

Underlying std::io::Error from a filesystem call.