Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7011781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:10:14+00:00 2026-05-27T22:10:14+00:00

I have this program written in C++ Builder 6. I didn’t write all the

  • 0

I have this program written in C++ Builder 6. I didn’t write all the code, just some of it. The language, however, is not C++ (as far as I’m aware) – it looks more like Delphi or Pascal. So that’s why I included them all in the tags.

I have an int called Oversteering.

try
{
    Oversteering=HoursCounter.ToInt();
}
catch(EConvertError &convertError)
{
    Oversteering=0;
}

HoursCounter is an AnsiString, and it is in the form of an int.

Since this is the only try/catch statement in the whole code (that’s not too good, I know), and I couldn’t find any good example of such in Delphi/Pascal/???, I don’t know if it’s correctly written.

Well, I try to convert the string to an int. Sometimes I get this error:

error

That is, an exception called EConvertError has occurred.

So my question is: why is this exception NOT caught by the catch statement?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:10:15+00:00Added an answer on May 27, 2026 at 10:10 pm

    This error is shown by the debugger when running through the code,
    if you run the exe and have the same situation the error message will not be shown to you

    The exception is caught but the debugger is notifiying you regarding the error in the code

    that is here

      try
         {
          Oversteering=HoursCounter.ToInt();
         }
    

    since running in the debugger the ,your trying to convert (blankspace) ” to integer, the debugger will show the exception…but when running the exe, the debugger will set

           Oversteering=0
    

    check this from about.com

    Break On Exceptions
    When building a program with exception handling, you may not want Delphi to break on Exceptions. This is a great feature if you want Delphi to show where an exception has occurred; however, it can be annoying when you test your own exception handling.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written this program, which sorts some ints using a functor: #include<iostream> #include<list>
I have a program written for text simplification in python language, I need this
I have written a program that uses qhttp to get a webpage. This works
This is the situation : I mostly program C# and have written types in
I have this program that should execute a piece of code base on the
I have this code in my program: (I included the cout statements for debugging
I have written a small program using Borland's C++ builder, and along the way,
Exposition: I'm familiar with C/C++/Scheme & OpenGL. I have this client/server program written in
I have seen a assembly program written from a book about assemble: assume cs:code
I have a data acquisition program written in C++ (Visual Studio 6.0). Some clients

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.