1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-09-25 21:02:38 +00:00

Add an exception thrown when promotion fails.

This commit is contained in:
2017-09-20 12:06:06 -07:00
parent ad8a0a9b2a
commit 566831246c
3 changed files with 29 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
package org.nwapw.abacus.exception;
/**
* Exception thrown when a promotion fails.
*/
public class PromotionException extends AbacusException {
/**
* Creates a new PromotionException with the default message
* and no additional information.
*/
public PromotionException() {
this("");
}
/**
* Creates a new PromotionException with the given additional message.
* @param message the additional message to include with the error.
*/
public PromotionException(String message) {
super("Failed to promote number instances.", message);
}
}