From cc84c037ece2a89424d490d9ee819f06cf4bb347 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Thu, 21 Nov 2024 20:16:47 +0300 Subject: Enha: match tool call with regexp; clear panics --- storage/storage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'storage/storage.go') diff --git a/storage/storage.go b/storage/storage.go index 7d0d941..08cd81a 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -69,9 +69,9 @@ func (p ProviderSQL) RemoveChat(id uint32) error { func NewProviderSQL(dbPath string, logger *slog.Logger) FullRepo { db, err := sqlx.Open("sqlite", dbPath) if err != nil { - panic(err) + logger.Error("failed to open db connection", "error", err) + return nil } - // get SQLite version p := ProviderSQL{db: db, logger: logger} p.Migrate() return p -- cgit v1.2.3