blob: df61a914cb09300d5d4c566ff63a60b15de424d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
use indexmap::IndexMap;
use shirabe_php_shim::PhpMixed;
#[derive(Debug)]
pub struct DuplicateKeyException {
pub message: String,
pub code: i64,
pub details: IndexMap<String, PhpMixed>,
}
impl DuplicateKeyException {
pub fn get_details(&self) -> &IndexMap<String, PhpMixed> {
&self.details
}
}
impl std::fmt::Display for DuplicateKeyException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.message)
}
}
impl std::error::Error for DuplicateKeyException {}
|