Google Groups Home
Help | Sign in
Message from discussion errorchecking branch
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Daniel K. O.  
View profile
 More options Mar 22, 4:28 pm
From: "Daniel K. O." <danielko.lis...@gmail.com>
Date: Sat, 22 Mar 2008 17:28:34 -0300
Local: Sat, Mar 22 2008 4:28 pm
Subject: Re: [ode-users] Re: errorchecking branch
2008/3/22, Oleh Derevenko <o...@eleks.lviv.ua>:

>  Currently asserts are customizable.

They are non-recoverable.

For an application with limited interactivity, like a game, you don't
need it. You design and tune everything so it always work (heh... you
wish).

For more interactivity you need to fail gracefully.

>  User can assign its own assert handler and what he likes: throw and
>  exception

Ok, this is the only "recoverable" way, with the current asserts. But
only for an exception-enabled build. And exceptions are always slower
(although we can debate about efficiency when things fail...).

> call abort

That's the only way to use current asserts.

> or assign "last error".

How can you set the error code when all the handler gets is a string
describing the error?

>  Why are all these complications you started for?

Because I need them for an interactive physics environment, where the
user is supposed to play with all of ODE. I don't want it aborting,
throwing exceptions to C glue code (script language bindings in C). If
I have to write checks for everything (say, to catch every exception
and translate into proper error handling, hoping nothing inside ODE
leaks because of the throw), I seems more useful to have into the
core, so others can benefit.

--
Daniel K. O.
"The only way to succeed is to build success yourself"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google