aboutsummaryrefslogtreecommitdiff
path: root/sem5/oop/m2/opg2/src/LoadException.java
diff options
context:
space:
mode:
Diffstat (limited to 'sem5/oop/m2/opg2/src/LoadException.java')
-rw-r--r--sem5/oop/m2/opg2/src/LoadException.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/sem5/oop/m2/opg2/src/LoadException.java b/sem5/oop/m2/opg2/src/LoadException.java
new file mode 100644
index 0000000..b6ea720
--- /dev/null
+++ b/sem5/oop/m2/opg2/src/LoadException.java
@@ -0,0 +1,16 @@
+
+public class LoadException extends Exception {
+
+ private int value;
+ private String msg;
+
+ public LoadException(int value, String msg) {
+ this.value = value;
+ this.msg = msg;
+ }
+
+ public String getMessage() {
+ return String.format("Invalid value %d (%s)", this.value, this.msg);
+ }
+
+}