summaryrefslogtreecommitdiff
path: root/src/main/java/sevenUnits/unit/LoadingException.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/sevenUnits/unit/LoadingException.java')
-rw-r--r--src/main/java/sevenUnits/unit/LoadingException.java32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/main/java/sevenUnits/unit/LoadingException.java b/src/main/java/sevenUnits/unit/LoadingException.java
index 7b3d708..2a75c99 100644
--- a/src/main/java/sevenUnits/unit/LoadingException.java
+++ b/src/main/java/sevenUnits/unit/LoadingException.java
@@ -22,15 +22,17 @@ import java.util.Optional;
/**
* An exception that occurred when loading a file. This wrapper class adds more
* info about the error.
- *
+ *
* @author Adrien Hopkins
* @since 2024-08-22
* @since v1.0.0
*/
public final class LoadingException extends RuntimeException {
/** The type of file that was being loaded. */
- public static enum FileType {
- @SuppressWarnings("javadoc") UNIT, @SuppressWarnings("javadoc") DIMENSION
+ public enum FileType {
+ @SuppressWarnings("javadoc")
+ UNIT, @SuppressWarnings("javadoc")
+ DIMENSION
}
private static final long serialVersionUID = -8167971828216907607L;
@@ -45,7 +47,7 @@ public final class LoadingException extends RuntimeException {
/**
* Create a LoadingException from some information, without a file.
- *
+ *
* @param lineNumber line number error happened on
* @param line text of invalid line
* @param fileType type of file
@@ -63,7 +65,7 @@ public final class LoadingException extends RuntimeException {
/**
* Create a LoadingException from some information, with a file.
- *
+ *
* @param lineNumber line number error happened on
* @param line text of invalid line
* @param file file error happened on
@@ -80,16 +82,12 @@ public final class LoadingException extends RuntimeException {
this.problem = problem;
}
- /**
- * @return the file this error happened in, if there is one
- */
+ /** @return the file this error happened in, if there is one */
public Optional<Path> file() {
return this.file;
}
- /**
- * @return type of file that this error happened in
- */
+ /** @return type of file that this error happened in */
public FileType fileType() {
return this.fileType;
}
@@ -107,23 +105,17 @@ public final class LoadingException extends RuntimeException {
this.line, this.problem));
}
- /**
- * @return text of line that caused this error
- */
+ /** @return text of line that caused this error */
public String line() {
return this.line;
}
- /**
- * @return number of line that caused this error
- */
+ /** @return number of line that caused this error */
public long lineNumber() {
return this.lineNumber;
}
- /**
- * @return the error, as an exception
- */
+ /** @return the error, as an exception */
public RuntimeException problem() {
return this.problem;
}