Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Development Programming Misc > Re: C++ Questio...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 9 Topic 905 of 1011
Post > Topic >>

Re: C++ Question: try-throw-catch

by "Brandon J. Van Every" <bvanevery@[EMAIL PROTECTED] > Jun 25, 2007 at 05:03 AM

On May 24, 7:18 pm, Tom Plunket <game...@[EMAIL PROTECTED]
> wrote:
>
> FWIW, I have written fairly heavily exception-laden code in the past.
> Rarely was it worth the trouble for anything more than trivial code,
> because of all of the extra things you need to keep in mind and properly
> handle.  It's probably been five years since I've typed 'try' in a C++
> program though, as proper software design tends to steer you away from
> "complex" mechanisms like exception handling anyway.

I would also argue that early in your project development, where
you're in a prototyping stage and the design is not fully nailed down,
you don't really know how exceptions should be handled.  Any kind of
error handling that returns to the caller, is simply passing the buck
as a meaningless gesture.  The caller isn't going to do a damn thing
about it, you aren't going to write that code.  You may decide on a
good policy later, when the code has proven its utility and you know
what you really need to get from it, but not when you first write it.
There's a strong likelyhood that you'll refactor that code out of
existence or otherwise throw it away.

I write local warnings as placeholders for a possible policy.  That's
mainly to record my thoughts about the case logic.  Debug logs are
useful, but passing errors up the call chain isn't.  Most of the time
it's a verbose way of saying, "I have no idea what to do, please crash
me."

When the design is stable, I'll clean up the error handling and the
API for public consumption.


Cheers,
Brandon Van Every
 




 9 Posts in Topic:
C++ Question: try-throw-catch
Michael Hathcock <lord  2007-05-14 20:49:21 
Re: C++ Question: try-throw-catch
ajk <foo@[EMAIL PROTEC  2007-05-15 11:29:37 
Re: C++ Question: try-throw-catch
Tom Plunket <gamedev@[  2007-05-24 16:18:56 
Re: C++ Question: try-throw-catch
"Brandon J. Van Ever  2007-06-25 05:03:21 
Re: C++ Question: try-throw-catch
Miss Elaine Eos <Misc@  2007-06-25 07:40:24 
Re: C++ Question: try-throw-catch
"Brandon J. Van Ever  2007-06-26 02:41:53 
Re: C++ Question: try-throw-catch
Miss Elaine Eos <Misc@  2007-06-25 19:55:06 
Re: C++ Question: try-throw-catch
"Brandon J. Van Ever  2007-06-26 03:20:14 
Re: C++ Question: try-throw-catch
ajk <ak@[EMAIL PROTECT  2007-06-27 00:14:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 19:32:58 CDT 2008.