Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Cache Package: return JError #1079

Merged
merged 1 commit into from Apr 1, 2012
Merged

Cache Package: return JError #1079

merged 1 commit into from Apr 1, 2012

Conversation

AmyStephen
Copy link
Contributor

No description provided.

@@ -139,7 +141,7 @@ public static function getInstance($handler = null, $options = array())
}
else
{
return JError::raiseWarning(500, JText::sprintf('JLIB_CACHE_ERROR_CACHE_STORAGE_LOAD', $handler));
throw new RuntimeException('Cache Storage Class is not known.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the sprintf

@AmyStephen
Copy link
Contributor Author

Thanks @chdemko - should be ready now.

@@ -114,7 +116,7 @@ public static function getInstance($handler = null, $options = array())
$handler = $conf->get('cache_handler');
if (empty($handler))
{
return JError::raiseWarning(500, JText::_('JLIB_CACHE_ERROR_CACHE_HANDLER_NOT_SET'));
throw new UnexpectedValueException(sprintf('Unable to load Cache Storage: %s', $handler));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UnexpectedValueException is great here but I don't think the message is accurate. This should only be thrown if no cache handler is set at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. You are right. Will change that.

@AmyStephen
Copy link
Contributor Author

@realityking - done, thanks

realityking added a commit that referenced this pull request Apr 1, 2012
Cache Package: return JError
@realityking realityking merged commit 55c19fc into joomla:staging Apr 1, 2012
@realityking
Copy link
Contributor

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants