On Tue, May 13, 2008 at 08:22:07PM -0400, D. Richard Hipp wrote: > Perhaps a better approach would be to modify sqlite3_close() to return > SQLITE_MISUSE if called with unfinalized prepared statements and also > fail and assert() in that case. That way, applications would crash > during development so that the bugs would be found more quickly, but > after delivery (when assert() is usually turned off) would merely leak > memory and file descriptors but would otherwise continue functioning. > > By similar reasoning, perhaps SQLite should always assert(0) in places > where it returns SQLITE_MISUSE. This is an abuse of assert() since > assert() is only suppose to fail due to internal inconsistencies, not > misuse by the caller. But it would get the point across.
I like your assert() idea. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users