i want to display errors. In PrestaShop I can display the errors with the function Tools::displayError() like this:

if (empty($email)) {
$this->errors[] = Tools::displayError('Email is empty.');
$this->doLog('ERROR: Email/username is empty');
} elseif (!Validate::isEmail($email)) {
$this->errors[] = Tools::displayError('Invalid email address.');
$this->doLog('ERROR: Invalid Email address');
}
Is there a similar way to do this in OpenCart? Is there a function i can use?