Re: [AD] new_api_branch error handling |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] new_api_branch error handling
- From: Hrvoje Ban <spoofer255@xxxxxxxxxx>
- Date: Sun, 30 Oct 2005 08:24:31 +0100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tH9/TVV1cj7hLRqR1VevpRWvadZ2S/ld8z5fqtGQ2vtgl/b+6iLiknlgv/4Rh9TEItFFhtp7pHEsVy74r4S+31ocKLhM1saCwr73DAuo2sSqo/SGHKIrKuQOBi8WXcz07SVsmVJm8wMSTgYkDDbgdYX54MiXZSU8FbPiZpF5NzE=
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?