ReFRACtor
FullPhysics::FeDisableException Class Reference

To detect things like divide by zero, we may turn on floating point exceptions. More...

#include <fe_disable_exception.h>

+ Collaboration diagram for FullPhysics::FeDisableException:

Public Member Functions

 FeDisableException ()
 
 ~FeDisableException ()
 

Detailed Description

To detect things like divide by zero, we may turn on floating point exceptions.

However, there may be code that legitimately cause floating point exceptions. This might be due to copy of garbage value which by chance cause an over or under flow (Lua does this). These garbage values aren't actually a problem unless they are used somewhere.

To allow code like this to execute, this class turns off floating point exceptions and then turn them back on in a destructor. So you can create an object of this type in any function where we don't want to trigger floating point exceptions.

Definition at line 21 of file fe_disable_exception.h.

Constructor & Destructor Documentation

◆ FeDisableException()

FullPhysics::FeDisableException::FeDisableException ( )
inline

Definition at line 23 of file fe_disable_exception.h.

◆ ~FeDisableException()

FullPhysics::FeDisableException::~FeDisableException ( )
inline

Definition at line 32 of file fe_disable_exception.h.


The documentation for this class was generated from the following file:

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:12