Skip to main content
gamedev.net
🔒 Locked

_matherr

Started by Crispy Jan 4, 2003 at 11:59 AM 1 replies 200+ views
Original Post
Crispy
Crispy
Hi, my program''s violating the domain of one of the trig functions and I''d like to catch the exception before Windows manages to throw it in my face:
  
int _matherr(struct exception  *e)
{
   //not really handling here, just testing if i can catch it

   WinError(e->name);
   return 1;
}
  
However, the exception is never passed to my own version of _matherr(). I''m a little vague on how the handler must be constructed - must it have some global prototype or does it suffice if I only define the function body in one of the source files (thus clamping the handler''s scope to the file module)? Thanks, Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Wildfire
Wildfire
Where are you defining your own version of the _matherr function? Maybe you should put a global declaration before the beginning of the main function?
How do I set my laser printer n stun? o
Crispy
Crispy
I have a global declaration plus the definition is in the same file with the function that does the trig math. It seems Windows thinks it can do better than me and keeps producing its error messages.

Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.