MCPcopy Create free account
hub / github.com/libgit2/git2go / IsErrorClass

Function IsErrorClass

git.go:299–307  ·  view source on GitHub ↗
(err error, c ErrorClass)

Source from the content-addressed store, hash-verified

297}
298
299func IsErrorClass(err error, c ErrorClass) bool {
300 if err == nil {
301 return false
302 }
303 if gitError, ok := err.(*GitError); ok {
304 return gitError.Class == c
305 }
306 return false
307}
308
309func IsErrorCode(err error, c ErrorCode) bool {
310 if err == nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…