mirror of
https://github.com/DanilaFe/abacus
synced 2026-09-25 21:02:38 +00:00
Throw the exception instead of returning null.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package org.nwapw.abacus.exception;
|
||||
|
||||
/**
|
||||
* Exception thrown by the Context in cases where lookup fails
|
||||
* where it should not.
|
||||
*/
|
||||
public class ContextException extends AbacusException {
|
||||
|
||||
/**
|
||||
* Creates a new ContextException without an extra message.
|
||||
*/
|
||||
public ContextException() {
|
||||
this("");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a ContextException with the given message.
|
||||
* @param message the message to use.
|
||||
*/
|
||||
public ContextException(String message){
|
||||
super("Context exception", message);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user