forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any way to trap exceptions?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
lozzer



Joined: 27 Jun 2007
Posts: 49

PostPosted: Wed Jan 09, 2008 11:11 am    Post subject: Any way to trap exceptions? Reply with quote

I am a non technical member of a software company, but provide support on our product.

From time to time users of our software report fatal exception errors when for instance the program has run out of resources such as graphics memory.

I am told by one of our developers that FTN95 is unable to trap such 'unexpected' errors, while most other development products do.

Is this the case or are we missing some functionality in the system?

Help would be appreciated.

Thanks.
_________________
Lozzer
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Wed Jan 09, 2008 1:41 pm    Post subject: Reply with quote

Under Win32 (not .NET) you will find exception handling routines in the help file under FTN95 library->Error and exception handling.

The standard routine to use is TRAP_EXCEPTION@.

Having trapped an exception is it usually not possible to recover from this state (whether using FTN95 or not). The best you can do is save your data and exit gracefully.
Back to top
View user's profile Send private message AIM Address
lozzer



Joined: 27 Jun 2007
Posts: 49

PostPosted: Wed Jan 09, 2008 2:01 pm    Post subject: Reply with quote

Thank you Paul. I'll check if we're already doing this much.
_________________
Lozzer
Back to top
View user's profile Send private message
lozzer



Joined: 27 Jun 2007
Posts: 49

PostPosted: Wed Jan 09, 2008 3:11 pm    Post subject: Reply with quote

That's worked a treat.


Thanks.
_________________
Lozzer
Back to top
View user's profile Send private message
Steve



Joined: 23 Feb 2007
Posts: 73

PostPosted: Wed Feb 13, 2008 12:33 pm    Post subject: Trap exception Reply with quote

Thanks for the reference in the FTN95 manual.

Have attempted to use TE and sure enough the callback can get invoked. Unfortunately, a heck of a lot of calls are being made so by call GetLastError() values of zero are ignored.

What has now been happening is that unusual "errors" are causing the TE to be invoked. For example, after an OPEN of a direct accdess file the GetLastError() #183 ( "Cannot create a file when that file already exists" ) happens for no apparent reason.

In order to stop the TE reacting to the error the ALL_EXCEPTIONS setting cannot be used - in fact, only the ACCESS_VIOLATION seems to be the only TE setting to not force the callback.

Any advice / help ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7927
Location: Salford, UK

PostPosted: Wed Feb 13, 2008 1:17 pm    Post subject: Reply with quote

I would not use ALL_EXCEPTIONS. Some exceptions are benign.
Identify the particular types of exception that you want to trap and provide a handler for each one in turn.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group