improve error handling for gconv.Struct/ghttp.Server; add NewSkip/NewfSkip function for package gerror

This commit is contained in:
John
2020-04-28 15:04:07 +08:00
parent 9e064e2651
commit 6e7224e306
10 changed files with 180 additions and 59 deletions

View File

@ -9,7 +9,6 @@ package gerror
import (
"bytes"
"fmt"
"github.com/gogf/gf/internal/intlog"
"io"
"runtime"
"strings"
@ -131,15 +130,6 @@ func formatSubStack(st stack, buffer *bytes.Buffer) {
if strings.Contains(file, gFILTER_KEY) {
continue
}
// Avoid GF stacks if not in GF development.
if !intlog.IsEnabled() {
if strings.Contains(file, "github.com/gogf/gf/") {
continue
}
if strings.Contains(file, "github.com/gogf/gf@") {
continue
}
}
// Avoid stack string like "<autogenerated>"
if strings.Contains(file, "<") {
continue