1
0
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:
2017-09-21 23:05:48 -07:00
parent f385a48aa2
commit 3057f66e66
3 changed files with 31 additions and 6 deletions

View File

@@ -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);
}
}