Re: [AD] new_api_branch error handling

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 10/30/05, Peter Wang <tjaden@xxxxxxxxxx> wrote:
> Firstly, the patch is buggy:
> 1. AL_ERROR_SIZE should be ALLEGRO_ERROR_SIZE

It's AL_ERROR_SIZE in my copy of allegro_new.

> 2. register_error_handler should set error_handler not assert_handler

Copy & paste...

> Secondly, allowing the user to throw an exception in a low level Allegro
> function may bypass some cleanup code in parent functions.  I don't know
> if I want to be writing code such that calls to error_handler are
> delayed until all cleanup has been done, just in case someone wants to
> throw an exception.

How about having al_error being called only in those parent functions?

Or, maybe it would be best to leave exceptions for C++ wrapper if
would required re-writing code with exceptions in mind?




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/