aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index 33c6ff8..fdec096 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,11 +1,13 @@
use std::error::Error;
use std::fmt;
+use tracing::error;
#[derive(Debug)]
pub struct IllegalArgumentException(String);
impl IllegalArgumentException {
pub fn new(msg: &str) -> IllegalArgumentException {
+ error!(msg);
IllegalArgumentException(msg.to_string())
}
}
@@ -29,6 +31,7 @@ pub struct IllegalStateException {
impl IllegalStateException {
pub fn new(msg: &str) -> IllegalStateException {
+ error!(msg);
IllegalStateException {
details: msg.to_string(),
}