MCPcopy Index your code
hub / github.com/docker/docker-agent / IsCantOpenError

Function IsCantOpenError

pkg/sqliteutil/sqlite.go:57–62  ·  view source on GitHub ↗

IsCantOpenError checks if the error is a SQLite CANTOPEN error (code 14).

(err error)

Source from the content-addressed store, hash-verified

55
56// IsCantOpenError checks if the error is a SQLite CANTOPEN error (code 14).
57func IsCantOpenError(err error) bool {
58 if sqliteErr, ok := errors.AsType[*sqlite.Error](err); ok {
59 return sqliteErr.Code() == sqlite3.SQLITE_CANTOPEN
60 }
61 return false
62}
63
64// DiagnoseDBOpenError provides a more helpful error message when SQLite
65// fails to open/create a database file.

Callers 3

NewSQLiteSessionStoreFunction · 0.92
OpenDBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected