libsvm/error.rs
1//! Error types.
2
3use std::path::PathBuf;
4
5/// The error type used across this crate.
6#[derive(Debug, thiserror::Error)]
7pub enum Error {
8 #[error("cannot convert path \"{path}\" to bytes")]
9 UnsupportedPath { path: PathBuf },
10 #[error("invalid hyperparameter: {reason}")]
11 InvalidHyperparameter { reason: String },
12 #[error("invalid data: {reason}")]
13 InvalidData { reason: String },
14 #[error("invalid error: {reason}")]
15 InternalError { reason: String },
16}