-
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.
- Loading branch information
1 parent
2169533
commit 7edf3c7
Showing
3 changed files
with
23 additions
and
2 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
19 changes: 19 additions & 0 deletions
19
src/main/java/dev/latvian/apps/webutils/html/UserError.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,19 @@ | ||
package dev.latvian.apps.webutils.html; | ||
|
||
import dev.latvian.apps.tinyserver.http.response.HTTPStatus; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class UserError extends RuntimeException { | ||
public final HTTPStatus status; | ||
public final Tag displayMessage; | ||
|
||
public UserError(HTTPStatus status, String message, @Nullable Tag displayMessage) { | ||
super(message); | ||
this.status = status; | ||
this.displayMessage = displayMessage; | ||
} | ||
|
||
public UserError(HTTPStatus status, String message) { | ||
this(status, message, null); | ||
} | ||
} |
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