From 9f5008b9b2af4f96cecff5f878657dc8cad4de80 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 15 Jan 2023 12:06:54 +0200 Subject: [PATCH] Improve error message from sqlite-mode.el * lisp/sqlite-mode.el (sqlite-mode-open-file): Add error checking. (Bug#60490) --- lisp/sqlite-mode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/sqlite-mode.el b/lisp/sqlite-mode.el index 83762b61943..c3047c786f7 100644 --- a/lisp/sqlite-mode.el +++ b/lisp/sqlite-mode.el @@ -55,10 +55,14 @@ (interactive "fSQLite file name: ") (unless (sqlite-available-p) (error "This Emacs doesn't have SQLite support, so it can't view SQLite files")) + (if (file-remote-p file) + (error "Remote SQLite files are not yet supported")) (pop-to-buffer (get-buffer-create (format "*SQLite %s*" (file-name-nondirectory file)))) (sqlite-mode) (setq-local sqlite--db (sqlite-open file)) + (unless (sqlitep sqlite--db) + (error "`sqlite-open' failed to open SQLite file")) (sqlite-mode-list-tables)) (defun sqlite-mode-list-tables () -- 2.39.2