-
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.
* chore: code cleaning * docs: add installation script * docs: update download script * Update README.md
- Loading branch information
1 parent
2faf6d5
commit af814cf
Showing
6 changed files
with
82 additions
and
49 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 was deleted.
Oops, something went wrong.
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 exception | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
func Generic(line int, where string, msg string) error { | ||
message := fmt.Sprintf("%s @ %s", msg, where) | ||
return fmt.Errorf("GloxGenericException([line %d] Error: %s)", line, message) | ||
} | ||
|
||
// Calls `e.New` with an empty string for the `where` argument. | ||
func Short(line int, msg string) error { | ||
return Generic(line, "", msg) | ||
} | ||
|
||
func Runtime(body any, message string) error { | ||
return fmt.Errorf("RuntimeException(%+v, %s)", body, message) | ||
} |
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