1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-09-25 12:52:33 +00:00

Do not use null in exceptions and add messages to exceptions.

This commit is contained in:
2017-09-07 13:21:18 -07:00
parent be94394a5c
commit 5b4773dee1
6 changed files with 13 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ package org.nwapw.abacus.exception;
public class AbacusException extends RuntimeException {
public AbacusException(String baseMessage, String description){
super(baseMessage + ((description == null) ? "." : (": " + description)));
super(baseMessage + ((description.equals("")) ? "." : (": " + description)));
}
}

View File

@@ -10,7 +10,7 @@ public class ComputationInterruptedException extends AbacusException {
* Creates a new exception of this type.
*/
public ComputationInterruptedException() {
super("Computation interrupted", null);
super("Computation interrupted", "");
}
}

View File

@@ -18,7 +18,7 @@ public class DomainException extends AbacusException {
* Creates a new DomainException with a default message.
*/
public DomainException(){
this(null);
this("");
}
}

View File

@@ -11,7 +11,7 @@ public class EvaluationException extends AbacusException {
* Creates a new EvaluationException with the default string.
*/
public EvaluationException() {
this(null);
this("");
}
/**