Posted on 2005-04-27
Hi Folks and\if\or Geobul!
I have been busy with studying exception handling and while walking through replies on questions of mine here at EE I bumped into this answer:
For an exception handling I would use something like:
procedure TForm1.BTNEMO1Click(Sender: TObject);
emo1 := emo1 + 1;
Raise exception.Create('Fout opgetreden'); end;
end; // end of case statement
// do something here with the exception like
on E: Exception do ...
Now I'd like to know what there is to do with the exception? Furthermore > if I use the Raise Exception.Create('') then some messagebox pops up asking the user whether to inform me. Clicking yes automatically kicks Outlook out of its lazy chair and fills in the unit name, procedure name and linenumber which causes the headache. Now I assume that that is what you meant by doing something with the exception, right?
Ps I'm using this codefragment so I'd like to understand it as much as possible.