-
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.
Merge pull request #2 from hlafaille/feat/1-add-command-support-to-ba…
…se-level #1 Add support for base level Command(s)
- Loading branch information
Showing
4 changed files
with
53 additions
and
11 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
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
20 changes: 20 additions & 0 deletions
20
.../java/xyz/hlafaille/eap/buitlin/exceptionhandler/EapDuplicateCommandExceptionHandler.java
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,20 @@ | ||
package xyz.hlafaille.eap.buitlin.exceptionhandler; | ||
|
||
import xyz.hlafaille.eap.ExceptionHandler; | ||
import xyz.hlafaille.eap.exception.EapDuplicateCommandContainerException; | ||
import xyz.hlafaille.eap.exception.EapDuplicateCommandException; | ||
import xyz.hlafaille.eap.util.ColorLogger; | ||
|
||
/** | ||
* Built in exception handler for: xyz.hlafaille.eap.exception.EapDuplicateCommandException | ||
*/ | ||
public class EapDuplicateCommandExceptionHandler extends ExceptionHandler<EapDuplicateCommandException> { | ||
public EapDuplicateCommandExceptionHandler() { | ||
super(EapDuplicateCommandException.class); | ||
} | ||
|
||
@Override | ||
public void execute(Exception exception) { | ||
ColorLogger.severe(exception.getMessage()); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/xyz/hlafaille/eap/exception/EapDuplicateCommandException.java
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,7 @@ | ||
package xyz.hlafaille.eap.exception; | ||
|
||
public class EapDuplicateCommandException extends Exception{ | ||
public EapDuplicateCommandException() { | ||
super("Duplicate commands are not allowed"); | ||
} | ||
} |