summaryrefslogtreecommitdiffstats
path: root/modules/packages/conan/conaninfo_parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/packages/conan/conaninfo_parser.go')
-rw-r--r--modules/packages/conan/conaninfo_parser.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/packages/conan/conaninfo_parser.go b/modules/packages/conan/conaninfo_parser.go
index 5bb3fb8930..de11dbee45 100644
--- a/modules/packages/conan/conaninfo_parser.go
+++ b/modules/packages/conan/conaninfo_parser.go
@@ -5,9 +5,10 @@ package conan
import (
"bufio"
- "errors"
"io"
"strings"
+
+ "code.gitea.io/gitea/modules/util"
)
// Conaninfo represents infos of a Conan package
@@ -79,7 +80,7 @@ func readSections(r io.Reader) (map[string][]string, error) {
continue
}
if line != "" {
- return nil, errors.New("Invalid conaninfo.txt")
+ return nil, util.NewInvalidArgumentErrorf("invalid conaninfo.txt")
}
}
if err := scanner.Err(); err != nil {