[Pogamut-list] Graceful stopping

jacob.schrum pogamut-forum at diana.ms.mff.cuni.cz
Thu Dec 16 16:58:21 CET 2010


Graceful stopping

Author: jacob.schrum

A while ago I asked a question about what the best way to terminate running bots/servers was. All bots have kill and stop methods, as do servers. I was wondering if things had been changed or made more elegant in Pogamut 3.1. Basically, I'm having some weird error which I think is related to this exception:

PogamutException[cz.cuni.amis.pogamut.ut2004.utils.MultipleUT2004BotRunner at 340423: Could not execute all agents due to an exception, see logs of respective agents.]
FatalErrorEvent[
        at cz.cuni.amis.pogamut.base.agent.utils.runner.impl.MultipleAgentRunner.startAgentsMain(MultipleAgentRunner.java:339)
...

However, the error only occurs intermittently, and it is hard to track down in the midst of multiple bots and now multiple servers. It's a it hard for me to know how to troubleshoot my code when these various kill/stop commands sometimes result in errors being reported that I don't really care about.

So, how do I stop the bots/servers elegantly? Can I do it without throwing an Exception? Or is there an easy way to catch and handle Exceptions of the types I know I don't care about? The reason I ask this second question is that most of these Exceptions seem to be occurring within their own Threads, which are themselves deep within the Pogamut source code. I would rather not modify the Pogamut source too much to handle these Exceptions, but because these Exceptions occur in their own Threads, they never get propagated back into my code for me to deal with.

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_parentId=487#form>





More information about the Pogamut-list mailing list