public function buildFinished(BuildEvent $event)
{
$error = $event->getException();
if ($error === null) {
$msg = PHP_EOL . $this->getBuildSuccessfulMessage() . PHP_EOL;
} else {
$msg = PHP_EOL . $this->getBuildFailedMessage() . PHP_EOL;
if (Project::MSG_VERBOSE <= $this->msgOutputLevel || !$error instanceof BuildException) {
$msg .= $error->__toString() . PHP_EOL;
} else {
$msg .= $error->getMessage();
}
}
$msg .= PHP_EOL . "Total time: " . self::formatTime(Phing::currentTimeMillis() - $this->startTime) . PHP_EOL;
if ($error === null) {
$this->printMessage($msg, $this->out, Project::MSG_VERBOSE);
} else {
$this->printMessage($msg, $this->err, Project::MSG_ERR);
}
}