Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages
Custom Exception Handling
This allows the user to define how exception handling happens for a particular library.Unfortunately due to a compiler bug in MSVC 6 (fixed in 7), some of the functionality won't be available for that compiler (this has also limited the customisability originally designed for).
To override the default behaviour, specialise the struct comet::comet_exception_handler<true> and implement the functions defined in the default implementation comet::comet_exception_handler.
comet {
template<>
struct comet_exception_handler<true> : comet_exception_handler<false>
{
static inline HRESULT catcher_all( const source_info_t &info)
{
throw;
}
};
}
With a suitable compiler, the method comet::comet_exception_handler::rethrow can be overridden to provide support for custom exceptions.
Don't try putting a try catch round a throw in catcher_all as the resulting destruct-twice of the exception when using MSV6 will cause very hard to trace bugs.