From 0fafa3e0e70027501ba1e7acf2c4d3de96a26d3f Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Thu, 10 Mar 2022 15:17:04 +0100 Subject: [PATCH 1/3] finished both exceptions. --- .../ch/zhaw/pm2/racetrack/InvalidFileFormatException.java | 5 ++++- .../ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java b/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java index e7d0c07..c60ea91 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java @@ -1,5 +1,8 @@ package ch.zhaw.pm2.racetrack; public class InvalidFileFormatException extends Exception { - // TODO: implementation + + public InvalidFileFormatException(String errorMessage) { + super(errorMessage); + } } diff --git a/src/main/java/ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java b/src/main/java/ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java index 25de664..97b0310 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java @@ -1,5 +1,7 @@ package ch.zhaw.pm2.racetrack; public class InvalidTrackFormatException extends Exception { - // TODO: implementation + public InvalidTrackFormatException(String errorMessage) { + super(errorMessage); + } } From 6080b48b828748ba31112fb313d3286b470a8bff Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Thu, 10 Mar 2022 15:18:16 +0100 Subject: [PATCH 2/3] finished both exceptions. --- .../java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java b/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java index c60ea91..91c59fa 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java @@ -1,7 +1,6 @@ package ch.zhaw.pm2.racetrack; public class InvalidFileFormatException extends Exception { - public InvalidFileFormatException(String errorMessage) { super(errorMessage); } From dca575999e4efe3335bff6aa91cb6b657f99b62a Mon Sep 17 00:00:00 2001 From: Leonardo Brandenberger Date: Thu, 10 Mar 2022 15:20:53 +0100 Subject: [PATCH 3/3] Added javadocs to exceptions. --- .../java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java | 3 +++ .../ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java b/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java index 91c59fa..6655e69 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/InvalidFileFormatException.java @@ -1,5 +1,8 @@ package ch.zhaw.pm2.racetrack; +/** + * Class for Exception when invalid Fileformat is used. + */ public class InvalidFileFormatException extends Exception { public InvalidFileFormatException(String errorMessage) { super(errorMessage); diff --git a/src/main/java/ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java b/src/main/java/ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java index 97b0310..3cdd04c 100644 --- a/src/main/java/ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java +++ b/src/main/java/ch/zhaw/pm2/racetrack/InvalidTrackFormatException.java @@ -1,5 +1,8 @@ package ch.zhaw.pm2.racetrack; +/** + * Class for Exception when invalid track format is used. + */ public class InvalidTrackFormatException extends Exception { public InvalidTrackFormatException(String errorMessage) { super(errorMessage);