aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar daniloaz <daniloaz@gmail.com>2024-03-24 21:47:33 +0100
committerLibravatar daniloaz <daniloaz@gmail.com>2024-03-24 21:47:33 +0100
commitb4e12fd1165b5e3960a1294dadec45eb40893b37 (patch)
tree214908f3aaf1bea984adfdce4d9b755ba71be670 /src/lib.rs
parent7e1eb27a06e5545b3d1b77b5998dc0463df27d70 (diff)
Unstable commit, won't compile.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index c7ea164..3ae6463 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -12,6 +12,27 @@ pub mod proxy;
pub mod subscription;
#[derive(Debug)]
+pub struct IllegalArgumentException(String);
+
+impl IllegalArgumentException {
+ pub fn new(msg: &str) -> IllegalArgumentException {
+ IllegalArgumentException(msg.to_string())
+ }
+}
+
+impl fmt::Display for IllegalArgumentException {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ write!(f, "{}", self.0)
+ }
+}
+
+impl Error for IllegalArgumentException {
+ fn description(&self) -> &str {
+ &self.0
+ }
+}
+
+#[derive(Debug)]
pub struct IllegalStateException {
details: String
}