More on Exceptions.

From: JoeC (enki034_at_yahoo.com)
Date: 01/31/05


Date: 31 Jan 2005 10:57:17 -0800

I have been reading the threads on this subject but they are getting
ling and this is just a continuation...

Please let me kniw if this is bad practice.

I have been reading the posts some I understand some confuse me more.
I posted my example I am trying to get to run. They say that it is a
bad example. I ask for an int but if I get a char, I want to trow an
error and have x set to 0; My program compiles but, it gets caught in
the loop if I use a char.

My book shows using this for a division by 0 error. AC++ uses try with
an empty vector.

At my hobby level should not not worry about this? What are some
specific cases when it is good to use?



Relevant Pages

  • Re: Reading a Binary File....
    ... I have a problem in reading a binary file. ... int acountnum; ... char phone; ...
    (comp.lang.c)
  • Re: sscanf() safety
    ... I came up with the idea of reading the whole file into a char buffer ... And there's no need to check for EOF at all - the ...
    (comp.lang.c)
  • Re: sscanf() safety
    ... I came up with the idea of reading the whole file into a char buffer ... And there's no need to check for EOF at all - the ...
    (comp.lang.c)
  • [9fans] Questions on notes
    ... top of that there always seems to be a race condition between somebody reading on /proc/n/note ... Speaking of constant polling: the following hangs 9vx for good on my system: ... void door_bell(void* dummy, char* note) ... int main ...
    (comp.os.plan9)
  • Re: What is the gain of "inline"
    ... int bla{ ... char p; ... /* do lots of things on p - reading that many characters from a file ...
    (comp.lang.c)