Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

FlyFire

Catching exceptions in Watcom C++

This topic is 6972 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest Anonymous Poster
Exceptions cause an interrupt when they occur i think. the first 256 of memory on the computer is the interrupt vector table, it's
a list of 32bit pointer to the handlers for
each of the interrupts. watcom has some functions for chaining interrupt handlers to your own functions. scout around the help files. the process may be a little different for exceptions, it may require a few assembly language calls to esoteric cpu registers.. not sure... I know that divide by zero can be handled just by replacing an interrupt handler. it is possible to change the interrupt handlers manually by poking around the table, but in a protected mode program i wouldnt advise it, because the dos extender needs to know which are real mode, and which are protected mode so it can switch back and forth when the interrupts are triggered.
hope this helps
Grommit

Share this post


Link to post
Share on other sites
Advertisement
This question may be more optional than catching exceptions only in Watcom C++
Although, how can i write my own exception handler to catch any fatal exceptions that cause to program termination?

------------------
FlyFire/CodeX
http://codexorg.webjump.com

Share this post


Link to post
Share on other sites
try looking up

try {
}
except

or something like that. I remember seeing it somewhere in the help documentation... if i see it again, i'll give you a shout.

//try {} except {} lets you safely run code. If the code causes an exception, rather than having the code bail out on you, you are given a chance to correct the error, and continuing without having the user know.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!