Skip to main content

tool_versions/
errors.rs

1// Copyright (c) 2025-2026 Michael S. Klishin and Contributors
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9use std::io;
10
11use thiserror::Error;
12
13#[derive(Debug, Error)]
14pub enum Error {
15    #[error("parse error at line {line}: {message}")]
16    ParseError { line: usize, message: String },
17
18    #[error("tool not found: {0}")]
19    ToolNotFound(String),
20
21    #[error("I/O error: {0}")]
22    Io(#[from] io::Error),
23}