#include <iostream>
#include <stdexcept>
{
public :
actor_t( context_t ctx )
+ limit_then_redirect< hello >(
+ limit_then_abort< bye >( 1 ) }
{}
{
.
event( []( mhood_t<hello> ) { std::cout <<
"Hello!" << std::endl; } )
}
{
so_5::send< hello >( *this );
so_5::send< hello >( *this );
so_5::send< bye >( *this );
}
};
{
public :
custom_logger_t()
{}
const char * file_name,
unsigned int line,
const std::string & message ) override
{
std::clog
<< "############################################################\n"
<< file_name << "(" << line << "): error: "
"############################################################"
<< std::endl;
}
};
int main()
{
try
{
{
},
{
params.error_logger(
std::make_shared< custom_logger_t >() );
} );
}
catch( const std::exception & ex )
{
std::cerr << "Error: " << ex.what() << std::endl;
return 1;
}
return 0;
}