hindsight_tests/
error.rs

1// Copyright (c) 2026 - present Nicholas D. Crosbie
2// SPDX-License-Identifier: MIT
3
4//! Error types for hindsight-tests
5
6use thiserror::Error;
7
8/// Errors that can occur during test log processing
9#[derive(Debug, Error)]
10pub enum TestsError {
11    /// Error parsing JSON
12    #[error("JSON parse error: {0}")]
13    JsonParse(#[from] serde_json::Error),
14
15    /// Error reading test output file
16    #[error("IO error: {0}")]
17    Io(#[from] std::io::Error),
18
19    /// Invalid test result format
20    #[error("Invalid test result format: {message}")]
21    InvalidFormat {
22        /// Description of the format error
23        message: String,
24    },
25}