1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

error handlers per party: log those routes too and all test cases paased

need cleanup though


Former-commit-id: 6b0c18e38b58af2388015c7cf1af9cc43d7d35d3
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-05-11 11:11:27 +03:00
parent c039730521
commit ad74d7b935
6 changed files with 71 additions and 44 deletions

View File

@@ -41,7 +41,10 @@ func newSource(fn reflect.Value) Source {
wd, _ := os.Getwd()
if relFile, err := filepath.Rel(wd, callerFileName); err == nil {
callerFileName = "./" + relFile
if !strings.HasPrefix(relFile, "..") {
// Only if it's relative to this path, not parent.
callerFileName = "./" + relFile
}
}
return Source{