فهرست منبع

Merge branch 'maint'

Bastien Guerry 4 سال پیش
والد
کامیت
4394eaf0e2
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      lisp/ob-sql.el

+ 3 - 1
lisp/ob-sql.el

@@ -101,7 +101,9 @@
 Set `sql-product' in Org edit buffer according to the
 Set `sql-product' in Org edit buffer according to the
 corresponding :engine source block header argument."
 corresponding :engine source block header argument."
   (let ((product (cdr (assq :engine (nth 2 info)))))
   (let ((product (cdr (assq :engine (nth 2 info)))))
-    (sql-set-product product)))
+    (condition-case nil
+        (sql-set-product product)
+      (user-error "Cannot set `sql-product' in Org Src edit buffer"))))
 
 
 (defun org-babel-sql-dbstring-mysql (host port user password database)
 (defun org-babel-sql-dbstring-mysql (host port user password database)
   "Make MySQL cmd line args for database connection.  Pass nil to omit that arg."
   "Make MySQL cmd line args for database connection.  Pass nil to omit that arg."