Re: [AD] new_api_branch error handling |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2005-10-30, Hrvoje Ban <spoofer255@xxxxxxxxxx> wrote:
> 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.
That module is obsolete. The new API work is done in a branch of the
normal `allegro' module.
See http://awiki.tomasu.org/bin/view/Main/AllegroDev#CVS_and_branches
> > 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?
That's one option.
> Or, maybe it would be best to leave exceptions for C++ wrapper if
> would required re-writing code with exceptions in mind?
IMHO that's the way to go.
Peter