forked from OxygenFramework/Oxygen.jl
-
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.
feature/add-custom-validation-error (OxygenFramework#214)
* added custom validation error handling * cleaned up the string interpolation in the server welcome function
- Loading branch information
Showing
5 changed files
with
37 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Errors | ||
## In this module, we export commonly used exceptions across the package | ||
|
||
export ValidationError | ||
|
||
# This is used by the Extractors.jl module to signal that a validation error has occurred | ||
struct ValidationError <: Exception | ||
msg::String | ||
end | ||
|
||
function Base.showerror(io::IO, e::ValidationError) | ||
print(io, "Validation Error: $(e.msg)") | ||
end | ||
|
||
end |
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