Remove product literal strings in "pht()", part 6
[phabricator.git] / src / applications / harbormaster / exception / HarbormasterMessageException.php
blob74213d47c49f139b307ec318bc09dc02681f0ba6
1 <?php
3 final class HarbormasterMessageException extends Exception {
5 private $title;
6 private $body = array();
8 public function __construct($title, $body = null) {
9 $this->setTitle($title);
10 $this->appendParagraph($body);
12 parent::__construct(
13 pht(
14 '%s: %s',
15 $title,
16 $body));
19 public function setTitle($title) {
20 $this->title = $title;
21 return $this;
24 public function getTitle() {
25 return $this->title;
28 public function appendParagraph($description) {
29 $this->body[] = $description;
30 return $this;
33 public function getBody() {
34 return $this->body;
37 public function newDisplayString() {
38 $title = $this->getTitle();
40 $body = $this->getBody();
41 $body = implode("\n\n", $body);
43 return pht('%s: %s', $title, $body);