Hello Arie...
A when exception is generally the answer to that kind of problems BUT,
the reason why this is not automated is the danger to automate what
should be exceptions...
In your case, there is a hardware problem... If you are not aware of it,
you cannot solve it... Should you add a UPS? Should the UPS
automatically shut down the PC? And that's just ONE case that can
corrupt an index... it could be a network card (or anything in the
network)...
So if the user just reindex the files (or worse, the files are reindexed
automatically), the problem will never be solved...
So what I do for ALL those exception is use a global exception handler
that give a 'gentle' message to the user, stores the hard fact of life
on the disk and tries to send them to me (or the sysadmin)... Then He or
I can see what's going on, solve the cause AND solve the index corruption
Best regards
--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting
More information on [
www.fabriceharari.com]
Arie Mars wrote:
> Hi,
> a power failure can result in a corrupt index. Which leads to an exception in my program. According to the errornumber, the HF/HFCS engine already knows, that it is a matter of a corrupt index. Unfortunately it's not offering the user the possibility to perform a reindex, on-the-fly.
> With HOnError() I can just trap some errors, but far from all errors. At least not 70052.
> What is the best way to trap such kind of errors? Do I have to wrap each and every H-function with an exception handler?
> Arie
>
>
Message forwarded from pcsoft.us.windev