probcomp / bayeslite

BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself.
http://probcomp.csail.mit.edu/software/bayesdb
Apache License 2.0
922 stars 64 forks source link

error-checking for bayesdb_has_generator / bayesdb_get_generator #444

Closed riastradh-probcomp closed 8 years ago

riastradh-probcomp commented 8 years ago

Currently, most callers of bayesdb_get_generator (in the soon-to-be-merged 20160624-riastradh-cgpm branch) are talking about generators of a specific population. But there's nothing that forces the generator to be of that implied population. We should add logic to catch the mistake of naming a generator for another population, which requires two different error branches / exceptions: one for nonexistent generator, one for generator of wrong population.

riastradh-probcomp commented 8 years ago

Fixed in https://github.com/probcomp/bayeslite/commit/43d131471bfe9d05479b55de52c82e5cf8ea78df.