File: error.rs

package info (click to toggle)
rust-npm-package-json 0.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 148 kB
  • sloc: makefile: 4
file content (14 lines) | stat: -rw-r--r-- 420 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde_json::Error as SerdeError;
use std::io::Error as IoError;
use thiserror::Error;

/// The errors that this library can return.
#[derive(Debug, Error)]
pub enum Error {
    /// An error that happened during IO operations.
    #[error("io error")]
    Io(#[from] IoError),
    /// An error that happened during the parsing stage.
    #[error("failed to parse package.json file")]
    Parse(#[from] SerdeError),
}