use std::{path::PathBuf, sync::Arc};
use thiserror::Error;
use crate::ir::Span;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum TerragruntError {
#[error("terragrunt include cycle: {0:?}")]
Cycle(Vec<Arc<std::path::Path>>),
#[error("terragrunt include depth limit ({limit}) exceeded")]
DepthExceeded {
limit: u32,
},
#[error("terragrunt path escape: {path:?}")]
PathEscape {
path: PathBuf,
},
#[error("terragrunt function `{func}`: {message}")]
Func {
func: &'static str,
message: Box<str>,
span: Box<Span>,
},
}