diff lisp/cedet/semantic/db.el @ 106568:a54ddff7ac90

* cedet/semantic/mru-bookmark.el (global-semantic-mru-bookmark-mode) (semantic-mru-bookmark-mode): Doc fixes. * cedet/semantic/db.el (semanticdb-cache-get): Use error instead of assert.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 14 Dec 2009 04:17:00 +0000
parents 83dde921cc1b
children 1d1d5d9bd884
line wrap: on
line diff
--- a/lisp/cedet/semantic/db.el	Mon Dec 14 04:11:43 2009 +0000
+++ b/lisp/cedet/semantic/db.el	Mon Dec 14 04:17:00 2009 +0000
@@ -450,7 +450,8 @@
   "Get a cache object on TABLE of class DESIRED-CLASS.
 This method will create one if none exists with no init arguments
 other than :table."
-  (assert (child-of-class-p desired-class 'semanticdb-abstract-cache))
+  (unless (child-of-class-p desired-class 'semanticdb-abstract-cache)
+    (error "Invalid SemanticDB cache"))
   (let ((cache (oref table cache))
 	(obj nil))
     (while (and (not obj) cache)
@@ -500,7 +501,8 @@
   "Get a cache object on DB of class DESIRED-CLASS.
 This method will create one if none exists with no init arguments
 other than :table."
-  (assert (child-of-class-p desired-class 'semanticdb-abstract-db-cache))
+  (unless (child-of-class-p desired-class 'semanticdb-abstract-cache)
+    (error "Invalid SemanticDB cache"))
   (let ((cache (oref db cache))
 	(obj nil))
     (while (and (not obj) cache)