private function exceptionContext($context, Exception $ex) { /** @var $terminator AutoloadHandler */ $terminator = $context->terminator; $terminator->reset(); if ($ex !== $context->lastException) { $message = sprintf('Exception when checking for class %s existence', $context->className); throw new ClassExistsThrownException($message, 0, $ex); } return false; }