mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Added exception and error handling for game worker
This commit is contained in:
parent
9c088fa75b
commit
e82bc6e671
2 changed files with 14 additions and 39 deletions
|
|
@ -28,12 +28,12 @@
|
|||
|
||||
package mage.server.game;
|
||||
|
||||
import mage.MageException;
|
||||
import mage.game.Game;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
import mage.MageException;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -61,7 +61,11 @@ public class GameWorker implements Callable {
|
|||
result.gameResult(game.getWinner());
|
||||
game.cleanUp();
|
||||
} catch (MageException ex) {
|
||||
logger.fatal("GameWorker error ", ex);
|
||||
logger.fatal("GameWorker mage error [" + game.getId() + "]", ex);
|
||||
} catch (Exception e) {
|
||||
logger.fatal("GameWorker general exception [" + game.getId() + "]", e);
|
||||
} catch (Error err) {
|
||||
logger.fatal("GameWorker general error [" + game.getId() + "]", err);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue