aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
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
}