Skip to content

Commit

Permalink
Updated server error format
Browse files Browse the repository at this point in the history
  • Loading branch information
yuce committed Sep 8, 2023
1 parent 53c43fb commit 3c29979
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/hzerrors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ func (e ServerError) Error() string {
func (e ServerError) String() string {
var sb strings.Builder
for _, h := range e.errorHolders {
sb.WriteString(fmt.Sprintf("%s: %s\n"))
sb.WriteString(fmt.Sprintf("%s: %s\n", h.ClassName, h.Message))
for _, trace := range h.StackTraceElements {
sb.WriteString(fmt.Sprintf("\t%s.%s(%s:%d)", trace.ClassName, trace.MethodName, trace.FileName, trace.LineNumber))
sb.WriteString(fmt.Sprintf("\t%s.%s(%s:%d)\n", trace.ClassName, trace.MethodName, trace.FileName, trace.LineNumber))
}
}
return fmt.Sprintf("server error:\n%s", sb.String())
Expand Down

0 comments on commit 3c29979

Please sign in to comment.