473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Borland C++ 5.01/5.01 Exception Handling Problem?

1
Dear Folks:

I am current working on a project involving trying to find the cause of some erratic behavior in an old Borland C++ 4.5 database application. Prehaps for obvious reason the orginal developer did not make use of exception handling. As for me,while trying to find the root cause of the problem I wish to (at the very least) use exception handlers as a debug tool. It is important therefore that I find a way to trap GPFs before they reach the fatal point. Nothing I have done thus far has offered me assurance that I can wrap suspected functions in try/catch blocks and expect the application to do anything except terminate with a GPF message. I'm i missing something here, or is my experience with modern system such as VC C++ jaded me into believing something that is not always true.

And so, a simple owl dialog based app is generated. A button is put on the screen that connects to code that is wrapped in a try/catch block. The button handler is intentioanlly coded to attempt a call function on a NULL pointer. I would expect that execution would jump into the nearest catch statement. NOT end up as a generalized GPF error dialog box--requireing a program restart.

I am currently using 5.02 because it was reported to have working exception handling. Now i am wondering if prehaps that 5.01 actually did throw unexcepted into the nearest catch(...). Before i revert to 5.01 is there anyone out there that can shed some light on this subject?

XP Pro
Borland C++ 5.01
16 bit application

BTW::The handlers work if i throw the exception myself. However, if i could afford to throw them, then i already know what i needed to kknow So.. i want to just allow the system to fault out and then record the information.



Thanks

JRC
Aug 22 '07 #1
1 2164
weaknessforcats
9,208 Expert Mod 8TB
Unless an exception is thrown, there's nothing to catch. End of speech.

You say the original developer did not use exceptions so I assume there are no throws. Catch blocks require a throw.

You are faced wir locating the sources of these errors and throwing excpeptions.

Bear in mind that exception handling added after the fact is vastly harder than doing it on the initial code.
Aug 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Páll Ólafsson | last post by:
Hi I have a problem with the Microsoft.ApplicationBlocks.ExceptionManagement? I can't get it to work in RELEASE mode? If I run the project in debug mode the block works fine but when I run the...
6
by: Daniel Wilson | last post by:
I am having exception-handling and stability problems with .NET. I will have a block of managed code inside try...catch and will still get a generic ..NET exception box that will tell me which...
7
by: Noor | last post by:
please tell the technique of centralize exception handling without try catch blocks in c#.
11
by: Serge Skorokhodov (216716244) | last post by:
Hi, I encounter a strange behavior of BCB 5.6. The example: #include <stdexcept> #include <memory> using namespace std; class A
7
by: Juggernaut | last post by:
Hi At my college some IT students were giving away free older computer books. I got a book called Borland C++ a programmers guide. So I was really just wondering what this Borland C++ is? I know...
4
by: Ele | last post by:
When Exception handling disabled compiler still spits out "C++ exception handler used." Why is that? Why does it ask for "Specify /EHsc"? Thanks! c:\Program Files\Microsoft Visual Studio...
11
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
41
by: Stuart Golodetz | last post by:
Hi all, Just wondering whether there's any reason why exception specifications are enforced at runtime, rather than at compile-time like in Java? (This was prompted by reading an article on...
1
by: itgendevelopment | last post by:
Hi there! Here is the scenario: I'm currently working on a project under Borland Visual C++ IDE. I have no issues on working with ADO and SQL. I can connect to the database, make queries,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.