mirror of
https://github.com/DanilaFe/abacus
synced 2026-09-24 20:32:35 +00:00
Add a DomainException that avoids using null in functions.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package org.nwapw.abacus.number;
|
||||
|
||||
/**
|
||||
* Exception thrown if the function parameters do not match
|
||||
* requirements.
|
||||
*/
|
||||
public class DomainException extends RuntimeException {
|
||||
|
||||
/**
|
||||
* Creates a new DomainException.
|
||||
* @param reason the reason for which the exception is thrown.
|
||||
*/
|
||||
public DomainException(String reason) {
|
||||
super(reason);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new DomainException with a default message.
|
||||
*/
|
||||
public DomainException(){
|
||||
this("Domain Error");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user