[Xapian-discuss] Re: 1.0 news, and a call for testing

Richard Boulton richard at lemurconsulting.com
Sun May 6 10:49:19 BST 2007

Fabrice Colin wrote:
> Apart from parsing the actual message, is there an easy way to determine 
> that
> the DB couldn't be open because the format version is not understood, as 
> opposed
> to any other case for which a DatabaseOpeningError may be thrown ?
> What about throwing a DatabaseVersionError exception instead ?

That seems like a reasonable suggestion to me.  We want to avoid forcing 
application writers to parse error messages - it's quite reasonable that 
they might want to handle this case differently to any other 
DatabaseOpeningError - for example, if they have the source data 
available still, the application could automatically start rebuilding 
the database, so that software upgrades can work without human 
intervention.  If the cause of the opening error is unknown, it's 
probably not safe for the application to do anything except for display 
the error to a human.

I'll look at putting a patch for this together shortly - I wouldn't 
imagine it would be terribly invasive.


More information about the Xapian-discuss mailing list