excel_lib/
errors.rs

1use thiserror::Error; 
2use crate::dependency::CellId; 
3use crate::parser::ast::Expr; 
4
5#[derive(Error, Debug)]
6pub enum Error {
7    #[error("Unable to calculate cell {0} with error {1}")]
8    Calculation(CellId, Box<Error>), 
9
10    #[error("Function {0} is not supported")]
11    FunctionNotSupport(String),
12
13    #[error("Unable to parse str {0}")]
14    UnableToParse(String), 
15
16    #[error("Unable to lex str {0}")]
17    UnableToLex(String), 
18
19    #[error("Dependency tree changed.")]
20    Volatile(Box<Expr>)
21}