Welcome! Log In Create A New Profile

Advanced

Trap "corrupt index" error

Posted by Arie 
Arie
Trap "corrupt index" error
November 14, 2008 01:54PM
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
Arie
Re: Trap "corrupt index" error
November 14, 2008 02:17PM
I'm testing a global exception handler right now. That's the way I believe.

Still, any advice will be welcome.

Arie
Fabrice Harari.pcs.crosspost
Re: Trap "corrupt index" error
November 14, 2008 03:31PM
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
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: