mirror of
https://github.com/boostorg/throw_exception.git
synced 2025-07-17 14:22:16 +02:00
Borland compatibility for enable_error_info.hpp, Tabs removed from exception.hpp, Documentation rebound.
[SVN r45273]
This commit is contained in:
committed by
Peter Dimov
parent
cb55993dbb
commit
e8fe47ca4e
@ -47,45 +47,45 @@ boost
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
char const *
|
char const *
|
||||||
what() const throw()
|
what() const throw()
|
||||||
{
|
{
|
||||||
if( data_ )
|
if( data_ )
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
char const * w = data_->what(typeid(*this));
|
char const * w = data_->what(typeid(*this));
|
||||||
BOOST_ASSERT(0!=w);
|
BOOST_ASSERT(0!=w);
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
catch(...)
|
catch(...)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
return typeid(*this).name();
|
return typeid(*this).name();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
exception()
|
exception()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
exception( exception const & e ):
|
exception( exception const & e ):
|
||||||
data_(e.data_)
|
data_(e.data_)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1500) )
|
#if BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1500) )
|
||||||
//Force class exception to be abstract.
|
//Force class exception to be abstract.
|
||||||
//Otherwise, MSVC bug allows throw exception(), even though the copy constructor is protected.
|
//Otherwise, MSVC bug allows throw exception(), even though the copy constructor is protected.
|
||||||
virtual ~exception() throw()=0;
|
virtual ~exception() throw()=0;
|
||||||
#else
|
#else
|
||||||
#if BOOST_WORKAROUND( __GNUC__, BOOST_TESTED_AT(4) )
|
#if BOOST_WORKAROUND( __GNUC__, BOOST_TESTED_AT(4) )
|
||||||
virtual //Disable bogus GCC warning.
|
virtual //Disable bogus GCC warning.
|
||||||
#endif
|
#endif
|
||||||
~exception() throw()
|
~exception() throw()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -103,12 +103,12 @@ boost
|
|||||||
};
|
};
|
||||||
|
|
||||||
#if BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1500) ) //See above.
|
#if BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1500) ) //See above.
|
||||||
inline
|
inline
|
||||||
exception::
|
exception::
|
||||||
~exception() throw()
|
~exception() throw()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user