#include <iostream>
#include <stdexcept>
class sample_event_exception_logger_t final
{
public:
const std::exception & event_exception,
{
std::cerr
<< "Event_exception, coop:"
<< coop << "; "
" error: "
<< event_exception.what()
<< std::endl;
}
};
{
public:
a_hello_t( context_t ctx ) :
so_5::agent_t( ctx )
{}
{
new sample_event_exception_logger_t ) );
throw std::runtime_error( "sample exception" );
}
{
}
};
int main()
{
try
{
{
} );
}
catch( const std::exception & ex )
{
std::cerr << "Error: " << ex.what() << std::endl;
return 1;
}
return 0;
}