#include <iostream>
#include <stdexcept>
{
public:
{}
{
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;
}
A helper header file for including all public SObjectizer stuff.
virtual exception_reaction_t so_exception_reaction() const noexcept
A reaction from SObjectizer to an exception from agent's event.
virtual void so_evt_start()
Hook on agent start inside SObjectizer.
coop_handle_t register_agent_as_coop(std::unique_ptr< A > agent)
Register single agent as a cooperation.
std::unique_ptr< Agent > make_agent(Args &&... args)
Helper method for simplification of agents creation.
void launch(Init_Routine &&init_routine)
Launch a SObjectizer Environment with default parameters.
exception_reaction_t
A reaction of SObjectizer to an exception from agent event.
@ shutdown_sobjectizer_on_exception