diff --git a/error_util.go b/error_util.go new file mode 100644 index 0000000..a5a307a --- /dev/null +++ b/error_util.go @@ -0,0 +1,12 @@ +package webutility + +import ( + "fmt" + + "git.to-net.rs/marko.tikvic/gologger" +) + +func WrapErrLoc(e error) error { + file, line := gologger.CallerFilenameAndLineNumber() + return fmt.Errorf("%s %d: %s", file, line, e.Error()) +}