opql/error/pql_error.rs
1use super::*;
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct PQLError {
5 pub loc: LocInfo,
6 pub kind: PQLErrorKind,
7}
8
9impl<E> From<(LocInfo, E)> for PQLError
10where
11 PQLErrorKind: From<E>,
12{
13 fn from((loc, kind): (LocInfo, E)) -> Self {
14 Self {
15 loc,
16 kind: PQLErrorKind::from(kind),
17 }
18 }
19}