Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit ee4ac64

Browse files
committed
better errs
1 parent 75f3af5 commit ee4ac64

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flow.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ func (ctx *Context) errorOut(isText bool, status int, friendly string, errs ...e
337337
errStr += "No Error Specified \n"
338338
}
339339
}
340-
// notice that we're using 1, so it will actually log the where
340+
// notice that we're using 1, so it will actually log the where // actually one is errorOut
341341
// the error happened, 0 = this function, we don't want that.
342-
pc, file, line, _ := runtime.Caller(1)
342+
pc, file, line, _ := runtime.Caller(2)
343343
lineNumber = line
344344
funcName = runtime.FuncForPC(pc).Name()
345345
fileName = file
@@ -360,6 +360,7 @@ func (ctx *Context) errorOut(isText bool, status int, friendly string, errs ...e
360360
ctx.Renderer.Text(ctx.W, status, data.nicelyFormatted())
361361
return
362362
}
363+
// ctx.Store.Logger.Error("ERROR["+strconv.Itoa(status)+"]:", data)
363364
view.JSON(ctx.W, status, data)
364365
}
365366

0 commit comments

Comments
 (0)