/**
* Method to check if the extension is already present in the database
*
* @return void
*
* @since 3.4
* @throws \RuntimeException
*/
protected function checkExistingExtension()
{
try {
$this->currentExtensionId = $this->extension->find(array('element' => $this->element, 'type' => $this->type, 'client_id' => $this->clientId));
} catch (\RuntimeException $e) {
// Install failed, roll back changes
throw new \RuntimeException(Text::sprintf('JLIB_INSTALLER_ABORT_ROLLBACK', Text::_('JLIB_INSTALLER_' . $this->route), $e->getMessage()), $e->getCode(), $e);
}
}