mirror of
https://github.com/kataras/iris.git
synced 2026-01-22 19:36:00 +00:00
create the new FileServer and HandleDir, deprecate the rest APIBuilder/Party static methods and more
relative: https://github.com/kataras/iris/issues/1283 and removing pongo2 from vendor: https://github.com/kataras/iris/issues/1284 Former-commit-id: 3ec57b349f99faca2b8e36d9f7252db0b6ea080d
This commit is contained in:
@@ -64,7 +64,7 @@ func (r *Reporter) AddErr(err error) bool {
|
||||
}
|
||||
|
||||
if stackErr, ok := err.(StackError); ok {
|
||||
r.addStack(stackErr.Stack())
|
||||
r.addStack("", stackErr.Stack())
|
||||
} else {
|
||||
r.mu.Lock()
|
||||
r.wrapper = r.wrapper.AppendErr(err)
|
||||
@@ -108,7 +108,7 @@ func (r *Reporter) Describe(format string, err error) {
|
||||
return
|
||||
}
|
||||
if stackErr, ok := err.(StackError); ok {
|
||||
r.addStack(stackErr.Stack())
|
||||
r.addStack(format, stackErr.Stack())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -126,12 +126,15 @@ func (r *Reporter) Stack() []Error {
|
||||
return r.wrapper.Stack
|
||||
}
|
||||
|
||||
func (r *Reporter) addStack(stack []Error) {
|
||||
func (r *Reporter) addStack(format string, stack []Error) {
|
||||
for _, e := range stack {
|
||||
if e.Error() == "" {
|
||||
continue
|
||||
}
|
||||
r.mu.Lock()
|
||||
if format != "" {
|
||||
e = New(format).Format(e)
|
||||
}
|
||||
r.wrapper = r.wrapper.AppendErr(e)
|
||||
r.mu.Unlock()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user