Re: Why leave the error handling to the caller?
- From: Richard Heathfield <rjh@xxxxxxxxxxxxxxx>
- Date: Fri, 22 Jun 2007 07:51:20 +0000
Malcolm McLean said:
<snip>
No, the specification was to produce a function that filled out the
structure giving a list of strings, from an input consisting of a line
of strings separated by commas.
Separate the concept of a list of strings from the concept of input
parsing.
Now separate the concept of a list from the concept of a string.
Now the error handling is becoming manageable (you will recall that you
originally wrote that code to demonstrate that the error handling was a
PITN to write), and the program's complexity is being reduced as more
and more work is farmed out to re-usable library modules.
What you end up with is rather elegant (if done properly), and eminently
re-usable.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
.
- Follow-Ups:
- Re: Why leave the error handling to the caller?
- From: Malcolm McLean
- Re: Why leave the error handling to the caller?
- References:
- Why leave the error handling to the caller?
- From: Chad
- Re: Why leave the error handling to the caller?
- From: Malcolm McLean
- Re: Why leave the error handling to the caller?
- From: Richard Heathfield
- Re: Why leave the error handling to the caller?
- From: Malcolm McLean
- Re: Why leave the error handling to the caller?
- From: Richard Heathfield
- Re: Why leave the error handling to the caller?
- From: Malcolm McLean
- Re: Why leave the error handling to the caller?
- From: Flash Gordon
- Re: Why leave the error handling to the caller?
- From: Richard Heathfield
- Re: Why leave the error handling to the caller?
- From: Malcolm McLean
- Re: Why leave the error handling to the caller?
- From: Richard Heathfield
- Re: Why leave the error handling to the caller?
- From: Johan Bengtsson
- Re: Why leave the error handling to the caller?
- From: Richard Heathfield
- Re: Why leave the error handling to the caller?
- From: Malcolm McLean
- Why leave the error handling to the caller?
- Prev by Date: Re: Very Simple, Minimalist Technique For OOP in C...
- Next by Date: Heap Size
- Previous by thread: Re: Why leave the error handling to the caller?
- Next by thread: Re: Why leave the error handling to the caller?
- Index(es):
Relevant Pages
|
|