projects
/
core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b7ab763
)
NPE catched (TODO: we should log it later)
author
Roland Häder
<roland@mxchange.org>
Fri, 21 Aug 2009 20:32:07 +0000
(20:32 +0000)
committer
Roland Häder
<roland@mxchange.org>
Fri, 21 Aug 2009 20:32:07 +0000
(20:32 +0000)
inc/classes/main/helper/class_BaseHelper.php
patch
|
blob
|
history
diff --git
a/inc/classes/main/helper/class_BaseHelper.php
b/inc/classes/main/helper/class_BaseHelper.php
index c79ccf14b82907ff25ee3dae3397ed611a4f5fdd..c9e9b068e1f3220aaf3bced08f8fca0ab54c4d22 100644
(file)
--- a/
inc/classes/main/helper/class_BaseHelper.php
+++ b/
inc/classes/main/helper/class_BaseHelper.php
@@
-190,8
+190,13
@@
class BaseHelper extends BaseFrameworkSystem {
* @throws NullPointerException If recovery of requested value instance failed
*/
public function prefetchValueInstance ($registryKey, $extraKey = null) {
* @throws NullPointerException If recovery of requested value instance failed
*/
public function prefetchValueInstance ($registryKey, $extraKey = null) {
- // Get the required instance
- $this->valueInstance = Registry::getRegistry()->getInstance($registryKey);
+ try {
+ // Get the required instance
+ $this->valueInstance = Registry::getRegistry()->getInstance($registryKey);
+ } catch (NullPointerException $e) {
+ // Not set in registry
+ // @TODO Try to log it here
+ }
// Is the value instance valid?
if (is_null($this->valueInstance)) {
// Is the value instance valid?
if (is_null($this->valueInstance)) {
@@
-204,10
+209,9
@@
class BaseHelper extends BaseFrameworkSystem {
$extraInstance = Registry::getRegistry()->getInstance($extraKey);
} // END - if
$extraInstance = Registry::getRegistry()->getInstance($extraKey);
} // END - if
- // Get the requested instance
try {
try {
+ // Get the requested instance
$this->valueInstance = ObjectFactory::createObjectByConfiguredName($registryKey . '_class', array($extraInstance));
$this->valueInstance = ObjectFactory::createObjectByConfiguredName($registryKey . '_class', array($extraInstance));
-
} catch (FrameworkException $e) {
// Okay, nothing found so throw a null pointer exception here
throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
} catch (FrameworkException $e) {
// Okay, nothing found so throw a null pointer exception here
throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);