Add Exception classes
This commit is contained in:
18
src/exception/ComplexException.java
Normal file
18
src/exception/ComplexException.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package exception;
|
||||||
|
|
||||||
|
public class ComplexException extends Exception {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UID
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -3407159767141706416L;
|
||||||
|
|
||||||
|
public ComplexException() {
|
||||||
|
super("This operation is complex.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComplexException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
18
src/exception/IllegalDimensionException.java
Normal file
18
src/exception/IllegalDimensionException.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package exception;
|
||||||
|
|
||||||
|
public class IllegalDimensionException extends Exception {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UID
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -1944427376879428635L;
|
||||||
|
|
||||||
|
public IllegalDimensionException() {
|
||||||
|
super("Illegal dimensions.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public IllegalDimensionException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
18
src/exception/IllegalSetupException.java
Normal file
18
src/exception/IllegalSetupException.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package exception;
|
||||||
|
|
||||||
|
public class IllegalSetupException extends Exception {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UID
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 4245692066570468500L;
|
||||||
|
|
||||||
|
public IllegalSetupException() {
|
||||||
|
super("Illegal setup.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public IllegalSetupException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
15
src/exception/NoSquareException.java
Normal file
15
src/exception/NoSquareException.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package exception;
|
||||||
|
|
||||||
|
public class NoSquareException extends Exception {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -4049443845429534140L;
|
||||||
|
|
||||||
|
public NoSquareException() {
|
||||||
|
super("This operation requires a square matrix.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public NoSquareException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
15
src/exception/SingularException.java
Normal file
15
src/exception/SingularException.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package exception;
|
||||||
|
|
||||||
|
public class SingularException extends Exception {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -5121014712549208662L;
|
||||||
|
|
||||||
|
public SingularException() {
|
||||||
|
super("This operation requires a non-singular matrix.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public SingularException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
6
src/exception/package-info.java
Normal file
6
src/exception/package-info.java
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/**
|
||||||
|
* Exceptions
|
||||||
|
*
|
||||||
|
* @author Daniel Weschke
|
||||||
|
*/
|
||||||
|
package exception;
|
||||||
Reference in New Issue
Block a user