forked from iBlitzkriegi/Potato
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added different ways the potato can be not delicious!
- Loading branch information
Showing
3 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
package org.drtshock; | ||
|
||
/** | ||
* An exception to describe that the potato isn't delicious! | ||
*/ | ||
public class NotDeliciousException extends Exception { | ||
|
||
public NotDeliciousException() { | ||
/** | ||
* The reason for non-deliciousness. | ||
*/ | ||
private NotDeliciousReason notDeliciousReason; | ||
|
||
public NotDeliciousException(NotDeliciousReason notDeliciousReason) { | ||
this.notDeliciousReason = notDeliciousReason; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.drtshock; | ||
|
||
/** | ||
* Different ways the potato can be not delicious | ||
*/ | ||
public enum NotDeliciousReason { | ||
|
||
NOT_BAKED, | ||
NOT_DELICIOUS_CONDIMENT | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters