Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2008, 4:53:34 PM (15 years ago)
Author:
rgrieder
Message:
  • Exported Exception displaying to an inline function instead of the exception constructor. This will make things easier with the SpecificExceptions. Going to do that when merging with OH2.
  • Added abort() statement to the global exception "try" in RootGameState
  • Changed global exception "try" to be activated always except when using the msvc debugger.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/util/Exception.h

    r2298 r2305  
    103103                  : Exception(description, lineNumber, filename, functionName)
    104104        {
    105             // let the catcher decide whether to display the message below level 4
    106             COUT(4) << this->getFullDescription() << std::endl;
    107105        }
    108106
     
    110108            : Exception(description)
    111109        {
    112             // let the catcher decide whether to display the message below level 4
    113             COUT(4) << this->getFullDescription() << std::endl;
    114110        }
    115111
     
    148144    CREATE_ORXONOX_EXCEPTION(GameState);
    149145
     146    /**
     147    @brief
     148        Helper function that creates an exception, displays the message, but doesn't throw it.
     149    */
     150    template <class T>
     151    inline const T& InternalHandleException(const T& exception)
     152    {
     153        // let the catcher decide whether to display the message below level 4
     154        COUT(4) << exception.getFullDescription() << std::endl;
     155        return exception;
     156    }
     157
    150158#define ThrowException(type, description) \
    151     throw SpecificException<Exception::type>(description, __LINE__, __FILE__, __FUNCTIONNAME__)
     159    throw InternalHandleException(SpecificException<Exception::type>(description, __LINE__, __FILE__, __FUNCTIONNAME__))
    152160
    153161    // define an assert macro that can display a message
Note: See TracChangeset for help on using the changeset viewer.