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;
}
Exemplo n.º 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);
	}
}
Exemplo n.º 3
0
MTSTRING MTExcepHelper::getAllExceptionString(const MTParserException &e)
{
	MTSTRING msg;
	
	for( unsigned int t=0; t<e.getNbDescs(); t++ )
	{
		msg += e.getDesc(t).c_str();

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

	return msg;
}