Skip to main content
Source Link

Whats the correct way for exception handling?

In Joomla core I find still many calls like this:

    // Check for errors.
    if (count($errors = $this->get('Errors')))
    {
        JError::raiseError(500, implode("\n", $errors));
        return false;
    }

But JError is deprecated since Platform release 12.1. So how should I use standard PHP exceptions.