function prepare($argarray)
{
- parent::prepare($argarray);
- return true;
+ try {
+ parent::prepare($argarray);
+ return true;
+ } catch (ClientException $e) {
+ $this->showError($e->getMessage(), $e->getCode());
+ return false;
+ } catch (Exception $e) {
+ common_log(LOG_ERR, $e->getMessage());
+ $this->showError(_('An internal error occurred.'), 500);
+ return false;
+ }
}
/**
function handle($argarray=null)
{
try {
- DomainStatusNetworkPlugin::registerEmail($this->email, true);
+ $confirm = DomainStatusNetworkPlugin::registerEmail($this->email);
+ EmailRegistrationPlugin::sendConfirmEmail($confirm);
$this->showSuccess();
} catch (ClientException $e) {
- $this->showError($e->getMessage());
+ $this->showError($e->getMessage(), $e->getCode());
} catch (Exception $e) {
common_log(LOG_ERR, $e->getMessage());
- $this->showError(_('An internal error occurred.'));
+ $this->showError(_('An internal error occurred.'), 500);
}
return;