Error Handler // have the errors as an internal errortable

Bart Pietercil bart.pietercil at gmail.com
Mon Sep 24 08:15:12 CDT 2007


On 24-sep-07, at 15:07, Ruslan Zasukhin wrote:

> On 24/9/07 3:47 PM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:
>
> Hi Bart,
>
>>>> Some thoughts about error reporting
>>>
>>>> As it stands now there is no way of saying that our errorProcedure
>>>> should ALWAYS be used, is there ? Maybe I should explain:
>>>> Now we need to explicitly call in an exception block of a stored
>>>> procedure the errorProcedure in order to trigger it. I think it  
>>>> would
>>>> be better if a developer would be able to specify that the
>>>> errorProcedure should always be used when an error occurs (not only
>>>> when called from a stored procedure but also when a query launched
>>>> through an API generates an error. This way error handling would be
>>>> as close as possible to the engine and as close as possible to the
>>>> developer (the one making the mistakes :-)) and logging of what  
>>>> went
>>>> wrong would be a lot easier.
>>>
>>> Add it please as feature request.
>>> I  see  - you want to get something like a hook to register own
>>> "event"
>>> handlers. Particularly error handler. Need to think.
>>
>> Right: set ErrorHook = call myCustomErrorHandler()
>>
>>
>> Then there is one more thing to round it off.
>>
>> I think the errors.xml file belongs inside the engine as a systable
>> (maybe it already is). I'm hoping for a system where we can query the
>> system errors table (all defined errorstates) so that we can build
>> our own "sister"tables having the same errorid but translated error
>> messages and more elaborated comments so we can feed this back to the
>> calling API in a , for our users, more readable form
>
> Well, in SQL standard they talk about some error handlers, and  
> mySQL for
> example have them...but I am not sure that they talk about feature  
> you are
> asking for.
>
> No I am sure. Its different. They specify instead of EXCEPTION  
> BLOCK the
> handlers block at beginning of routine.
>
> But you ask about some global-level event handler...
>

Correction

I ask for a global-level event handler that is called UNLESS there is  
an override in the EXCEPTION block of a procedure`
So
1) There is no exception block in procedure----> go to global event  
handler
2) There is exception block in procedure--> execute exception block  
( where it is still possible to call global level errorprocedure)


Bart


More information about the Valentina mailing list