-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JShell now allows wrong uri and dead server, will give correct respon…
…se to the user and will log them as warns
- Loading branch information
Showing
6 changed files
with
97 additions
and
26 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
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
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
34 changes: 34 additions & 0 deletions
34
...cation/src/main/java/org/togetherjava/tjbot/features/utils/ConnectionFailedException.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,34 @@ | ||
package org.togetherjava.tjbot.features.utils; | ||
|
||
/** | ||
* Happens when a connection has failed, or the URL was invalid. | ||
*/ | ||
public class ConnectionFailedException extends Exception { | ||
|
||
/** | ||
* Constructs a new exception with the specified detail message. The cause is not initialized, | ||
* and may subsequently be initialized by a call to {@link #initCause}. | ||
* | ||
* @param message the detail message. The detail message is saved for later retrieval by the | ||
* {@link #getMessage()} method. | ||
*/ | ||
public ConnectionFailedException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Constructs a new exception with the specified detail message and cause. | ||
* <p> | ||
* Note that the detail message associated with {@code cause} is <i>not</i> automatically | ||
* incorporated in this exception's detail message. | ||
* | ||
* @param message the detail message (which is saved for later retrieval by the | ||
* {@link #getMessage()} method). | ||
* @param cause the cause (which is saved for later retrieval by the {@link #getCause()} | ||
* method). (A {@code null} value is permitted, and indicates that the cause is | ||
* nonexistent or unknown.) | ||
*/ | ||
public ConnectionFailedException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |