Raise BayesDBError instead of Exception