Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Throwing Exception instead of try-catch block

Signed-off-by: Buddhima Wijeweera <buddhimawijeweera@yahoo.com>
  • Loading branch information...
commit a89332b640d49c9587d4966dc66053d53b5516ef 1 parent deb68e1
Buddhima Wijeweera authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 libraries/joomla/html/editor.php
13 libraries/joomla/html/editor.php
View
@@ -454,20 +454,17 @@ public function getButtons($editor, $buttons = true)
{
$plugin = new $className($this, (array) $plugin);
}
-
- try
+ else
{
+ throw new Exception("Class does not exists "+$className);
+ }
+
// Try to authenticate
- // Unsafe operation, might cause an exception if $className not exists
if ($temp = $plugin->onDisplay($editor, $this->asset, $this->author))
{
$result[] = $temp;
}
- }catch (Exception $e)
- {
- echo 'Exception while authenticating';
- echo 'Message ' . $e->getMessage(); //Print the error message
- }
+
}
return $result;
Please sign in to comment.
Something went wrong with that request. Please try again.