- } catch (ClientException $ce) {
- if ($this->boolean('ajax')) {
- $this->startHTML('text/xml;charset=utf-8');
- $this->elementStart('head');
- // TRANS: Page title after an AJAX error occurs
- $this->element('title', null, _('Ajax Error'));
- $this->elementEnd('head');
- $this->elementStart('body');
- $this->element('p', array('id' => 'error'), $ce->getMessage());
- $this->elementEnd('body');
- $this->endHTML();
- return;
- } else {
- $this->error = $ce->getMessage();
- $this->showPage();
- return;
- }
- }