Perhaps you need to go to the source of the problem and check that the object 
is valid before writing it out. Also check that you're calling the correct 
mitab functions.
 
Here's an example of writing out a feature:
 
mitab_handle hTAB = mitab_c_create(strFilename,"tab",strProjection,0,0,0,0);
if (hTAB!=NULL)
{
    mitab_feature hFeature;
}
 
mitab_feature 
--- On Tue, 21/10/08, Mikael Larsson <[EMAIL PROTECTED]> wrote:

From: Mikael Larsson <[EMAIL PROTECTED]>
Subject: RE: [mitab] catching exceptions from the mitab library.
To: [email protected]
Received: Tuesday, 21 October, 2008, 5:55 AM






 
Yes, but that does not work for me.
 
I never enter the catch-part, I still get a crash on the same line of code.







To: [EMAIL PROTECTED] com
From: [EMAIL PROTECTED] .com
Date: Mon, 20 Oct 2008 14:42:29 -0700
Subject: Re: [mitab] catching exceptions from the mitab library.









Have you tried adding a try { .... } catch (..) { } block around the call that 
crashes ?

--- On Sun, 19/10/08, Mikael Larsson <[EMAIL PROTECTED] com> wrote:

From: Mikael Larsson <[EMAIL PROTECTED] com>
Subject: [mitab] catching exceptions from the mitab library.
To: [EMAIL PROTECTED] com
Received: Sunday, 19 October, 2008, 9:52 PM






Hello!

I'm writing a software to convert a file from one coordinate system to another. 
I do this by reading the different objects from the file with the available 
functions, transform the coordinates and write back the object to a new output 
file.

For one input file I get an exception when calling the mitab_c_write_ feature 
function. The exception originates in the function PickSeedsForSplit found in 
the file mitab_mapindexblock .cpp. The problem seems to be that nSrcHeight or 
nSrcWidth can be equal to zero. Then the division on line 1065 will not work 
and an exception is thrown.

Is there any way to catch this exception in my MFC application? I would very 
much like to avoid a software crash because of this.

I'm using the latest version (1.7.0).
 
Can anyone please advise?
 
Best Regards
Mikael Larsson



Connect to the next generation of MSN Messenger  Get it now! 
Send instant messages to your online friends http://au.messenger .yahoo.com 



Explore the seven wonders of the world Learn more!  













Send instant messages to your online friends http://au.messenger.yahoo.com 

Reply via email to