protected function handleTransitionException(Transition $transition, Exception $e)
{
// override if necessary to log exceptions or to add some extra info
// to the underlying storage facility (for example, an exception will
// not lead to a transition, so this can be used to indicate a failed
// transition in some sort of history structure)
$this->getContext()->setFailedTransition($transition, $e);
}