From: Roland Haeder Date: Tue, 7 Apr 2015 15:45:44 +0000 (+0200) Subject: Throwing an NPE here hides the actual exception and it is much harder to track what... X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=c879213e1d244b3e814473050719e87a7a343e82;hp=6f3b09f6a22137eb528d1a76424293f1f7103780 Throwing an NPE here hides the actual exception and it is much harder to track what is wrong. Signed-off-by: Roland Häder --- diff --git a/inc/classes/main/helper/class_BaseHelper.php b/inc/classes/main/helper/class_BaseHelper.php index daa707f9..8011081a 100644 --- a/inc/classes/main/helper/class_BaseHelper.php +++ b/inc/classes/main/helper/class_BaseHelper.php @@ -217,13 +217,8 @@ class BaseHelper extends BaseFrameworkSystem { // Is the value instance valid? if (is_null($this->valueInstance)) { - try { - // Get the requested instance - $this->valueInstance = ObjectFactory::createObjectByConfiguredName($registryKey . '_class', array($this->extraInstance)); - } catch (FrameworkException $e) { - // Okay, nothing found so throw a null pointer exception here - throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); - } + // Get the requested instance + $this->valueInstance = ObjectFactory::createObjectByConfiguredName($registryKey . '_class', array($this->extraInstance)); } // END - if }