If I comment out the call to the base class assignment operator, the =
tests pass under VC++ 6.0. Not sure what the parent class is doing, but =
it appears that if the parent is called, then the "Unknown exception" is =
returned for the string. If not, the expected string is returned. Not =
sure exactly why, but it might offer a clue to why the test fails on =
VC++ 6.0.
-Doug
/// Perform an assignment
Exception&=20
Exception::operator=3D( const Exception& other )
{=20
// exception::operator=3D (other); // note! this line removed on =
VC++6.0 gives expected behavior
if (&other !=3D this)=20
{
m_message =3D other.m_message;=20
m_lineNumber =3D other.m_lineNumber;
m_fileName =3D other.m_fileName;
}
return *this;=20
}
|