diff --git a/operation.go b/operation.go index ba3a05b5f..c35350a15 100644 --- a/operation.go +++ b/operation.go @@ -386,7 +386,7 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F param.Schema = schema } default: - return fmt.Errorf("%s is not supported paramType", paramType) + return fmt.Errorf("not supported paramType: %s", paramType) } err := operation.parseParamAttribute(commentLine, objectType, refType, paramType, ¶m) diff --git a/parser.go b/parser.go index 9db79fa39..ce816724f 100644 --- a/parser.go +++ b/parser.go @@ -1078,7 +1078,7 @@ func (parser *Parser) parseRouterAPIInfoComment(comments []*ast.Comment, fileInf for _, comment := range comments { err := operation.ParseComment(comment.Text, fileInfo.File) if err != nil { - return fmt.Errorf("ParseComment error in file %s :%+v", fileInfo.Path, err) + return fmt.Errorf("ParseComment error in file %s for comment: '%s': %+v", fileInfo.Path, comment.Text, err) } if operation.State != "" && operation.State != parser.HostState { return nil