Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to trap invalid point operation

Status
Not open for further replies.

pierrotsc

Programmer
Nov 25, 2007
358
US
I have a procedure that if the user does not input any values, it will generate an invalid point operation. Is there a way I can trap that and just display a requester instead of a program crash.
It crashes when it reach c:=b/a; if b and a equal zero, then I get the error. I just want to display a nice error message.
Thanks for any help.
Pierrotsc
 

Code:
if a = 0 then begin
  ShowNiceMessage;
   c := 0;
end
else
  c := b/a;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top