Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Execute a piece of code BEFORE closing with error?

Author
Message
Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 19th Aug 2011 09:02
Is there a way to have a program execute a function of code before the program closes if there is a local DBPro error? (Example: Array out of bounds or x/0)

I heard the Matrix1Util has a way to control error message but can I do this?

Thanks in advance, Qqite

Ventures of the worlds around us are limited only by our imagination.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Aug 2011 15:28
No, I simply allow the generation of a standard DBPro error message - I don't stop messages being propagated. I remember that Lee was asked to do this at the last convention...

I'll take a look and see what can be done to capture errors just before exit - it may be possible to do without compiler changes.

Jambo B
16
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 21st Aug 2011 17:51
Cheers, Ian, that would be very handy.

We all slip up sometimes (!), and I too would like to be able to handle errors gracefully... I always think it looks kind of unprofessional to have errors popping up which are generated by a dev environment.

Login to post a reply

Server time is: 2026-07-10 17:19:32
Your offset time is: 2026-07-10 17:19:32