Re: [SC-L] Coding with errors in mind - a solution?

2006-09-05 Thread der Mouse
>> if an exception is handled several call layers above, you don't have >> to copy/translate and relay the error at each layer, [...] > But the intervening stack frames have to be (painfully) aware of the > fact that they might terminate abruptly. That's what unwind-protect is for. What, you don'

Re: [SC-L] Coding with errors in mind - a solution?

2006-09-05 Thread Tim Hollebeek
> -Original Message- > From: Pascal Meunier [mailto:[EMAIL PROTECTED] > Sent: Friday, September 01, 2006 7:41 AM > To: [EMAIL PROTECTED] > Cc: Tim Hollebeek; sc-l@securecoding.org > Subject: Re: [SC-L] Coding with errors in mind - a solution? > > On 8/31

Re: [SC-L] Coding with errors in mind - a solution?

2006-09-05 Thread Leichter, Jerry
[Picking out one minor point:] | [Exceptions] can simplify the code because | -as previously mentioned by Tim, they separate error handling from normal | logic, so the code is easier to read (it is simpler from a human reader's | perspective). I have found bugs in my own code by going from error h

Re: [SC-L] Coding with errors in mind - a solution?

2006-09-01 Thread Pascal Meunier
On 8/31/06 8:05 PM, "mikeiscool" <[EMAIL PROTECTED]> wrote: > On 9/1/06, Pascal Meunier <[EMAIL PROTECTED]> wrote: >> >> >> >> On 8/30/06 3:46 PM, "Tim Hollebeek" <[EMAIL PROTECTED]> wrote: >> >>> >>> What you've proposed are exceptions. They do help (some) in separating >>> the normal lo

Re: [SC-L] Coding with errors in mind - a solution?

2006-08-31 Thread mikeiscool
On 9/1/06, Pascal Meunier <[EMAIL PROTECTED]> wrote: > > > > On 8/30/06 3:46 PM, "Tim Hollebeek" <[EMAIL PROTECTED]> wrote: > > > > > What you've proposed are exceptions. They do help (some) in separating > > the normal logic from error handling, but: > > > > (1) they often leave the job "half don

Re: [SC-L] Coding with errors in mind - a solution?

2006-08-31 Thread Pascal Meunier
gt;> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Michael S Hines >> Sent: Wednesday, August 30, 2006 11:07 AM >> To: sc-l@securecoding.org >> Subject: [SC-L] Coding with errors in mind - a solution? >

Re: [SC-L] Coding with errors in mind - a solution?

2006-08-30 Thread Dave Aronson
William L. Anderson wrote: > Years ago I had to write a Fortran > program as part of a job interview. The program problem was quite > simple, and I wrote one that checked for as many errors as I could think > of. My interviewer wanted to know what took me so long. I didn't get an > offer. Years a

Re: [SC-L] Coding with errors in mind - a solution?

2006-08-30 Thread Tim Hollebeek
ginal Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Michael S Hines > Sent: Wednesday, August 30, 2006 11:07 AM > To: sc-l@securecoding.org > Subject: [SC-L] Coding with errors in mind - a solution? > > a simple structure that provides for

Re: [SC-L] Coding with errors in mind - a solution?

2006-08-30 Thread Pascal Meunier
Worse is when it works in unintended ways without producing an error. The code has to detect whenever something doesn't match a white list of expected program states and inputs. I think that in example code, the detection is more important than the subsequent handling because the handling will va

Re: [SC-L] Coding with errors in mind - a solution?

2006-08-30 Thread William L. Anderson
Michael, this is an interesting note. Years ago I had to write a Fortran program as part of a job interview. The program problem was quite simple, and I wrote one that checked for as many errors as I could think of. My interviewer wanted to know what took me so long. I didn't get an offer. My 2 ce

[SC-L] Coding with errors in mind - a solution?

2006-08-30 Thread Michael S Hines
a simple structure that provides for errors would go a long way...   If - then - else - on error Do - end - on error Let x = y - on error Let x = function() on error etc...      The problem is writing code without thinking of the possible errors that might arise.   This forces you to think a