Commit 836cccf887fadb02f139631cce2b8781ffe85948
1 parent
b3f1275cda
Exists in
master
WrapErrLoc() func
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
error_util.go
File was created | 1 | package webutility | |
2 | |||
3 | import ( | ||
4 | "fmt" | ||
5 | |||
6 | "git.to-net.rs/marko.tikvic/gologger" | ||
7 | ) | ||
8 | |||
9 | func WrapErrLoc(e error) error { | ||
10 | file, line := gologger.CallerFilenameAndLineNumber() | ||
11 | return fmt.Errorf("%s %d: %s", file, line, e.Error()) | ||
12 | } | ||
13 |