package org.quantumlabs.manicraft.state;

import org.apache.log4j.Logger;
import org.quantumlabs.manicraft.CoreEventLoop;
import org.quantumlabs.manicraft.ITransitionErrorHandler;

/**
 * Created by quintus on 4/26/15.
 */
public class TransitionErrorState extends CoreEventLoop.State implements ITransitionErrorHandler {
    public TransitionErrorState(CoreEventLoop eventLoop) {
        super(eventLoop);
    }

    final static private Logger LOG = Logger.getLogger(TransitionErrorState.class);

    @Override
    public void handleTransitionError(CoreEventLoop eventLoop, Exception e) {
        LOG.error("Transition error happen", e);
        System.exit(-1);
    }

    @Override
    public void run() {
        //TODO
    }
}
