FR: have the errors as an internal errortable
Ivan Smahin
ivan_smahin at paradigmasoft.com
Tue Sep 25 02:46:33 CDT 2007
Hello Bart,
Monday, September 24, 2007, 3:47:28 PM, you wrote:
>>> 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()
Well, we wonder - is it something you see somewhere or just a dream?
1. It is relatively easy to get such feature for any exception raised
in any stored procedure. Set some global handler (any exception raised
by any operation) is more difficult task.
2. Such handler makes the database looks like a box which eats any
exception raised inside one. Assume I get your database for some
purposes and open it in vStudio. Perform some query which is obviously
should raise an exception (some parser error) - but see nothing
because of some handler,
which is set by someone. Probably it should be 'set handler' per session?
On the other hand - triggers are kind of event handlers.
I mean - we need to think of event handlers in the wide sense.
Something like
"trigger on any error"
"trigger on error xxxxx"
"trigger on insert in table t1"
...
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
More information about the Valentina
mailing list