MTSTRING getAllExceptionString(const MTParserException &e)
{
	MTSTRING msg;
	
	for( unsigned int t=0; t<e.getNbDescs(); t++ )
	{
		MTSTRING desc;
		
		// Take the localized exception description if available 
		try
		{
			desc = MTParserLocalizer::getInstance()->getExcep(e.getException(t)->getData());
		}
		catch( MTParserException )
		{
			// description not available...so take the default english message
			desc = e.getDesc(t).c_str();
		}
		msg += desc;

		if( t != e.getNbDescs()-1 )
		{
			msg +=  _T("\r\n");
		}		
	}	

	return msg;
}
Beispiel #2
0
void MTExcepHelper::setLastExcep(const MTParserException &e)
{
	m_lastExcep.clear();
	
	for( unsigned int t=0; t<e.getNbDescs(); t++ )
	{		
		SLastException le;
		le.data = e.getException(t)->getData();
		le.desc = e.getDesc(t).c_str();
		
		m_lastExcep.push_back(le);
	}
}