Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

try... except...

Posted on 2002-07-08
2
Medium Priority
?
158 Views
Last Modified: 2010-04-04
Hello!

What am I doing wrong ?

I want to intercept an exception without getting it to pop out.  Here a sample code:

try
max := 0;
temp := FloatToStr(100 / max);
except
  showmessage('error');
end;

Here, I want to get the showmessage BUT NOT the Delphi error of division by 0.  I know it sounds stupid, but now I get both!

Any hint ??
Thanks!!
0
Comment
Question by:qas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
Madshi earned 200 total points
ID: 7137871
You're not doing anything wrong. It's correct what you did.

The Delphi error box only is shown inside of the IDE this way. Try it outside of the IDE and the Delphi box will not be shown.

Regards, Madshi.
0
 

Author Comment

by:qas
ID: 7137893
Thanks alot!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question