[
http://jira.magnolia-cms.com/browse/MAGNOLIA-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Haderka updated MAGNOLIA-3754:
----------------------------------
Fix Version/s: 4.4.x
(was: 4.4.5)
> Cache filter should rethrow exceptions instead of wrapping them (at least
> when unrelated)
> -----------------------------------------------------------------------------------------
>
> Key: MAGNOLIA-3754
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3754
> Project: Magnolia
> Issue Type: Bug
> Components: cache
> Reporter: Grégory Joseph
> Fix For: 4.4.x
>
>
> The {{CacheFilter}} currently does {{catch (Throwable th) {}}, essentially,
> as far as my understanding goes, to catch {{LockTimeoutException}} without
> being ehcache-specific. There's an if() block right there which knows what
> the problem is. When that if block isn't evaluated, we still {{throw new
> RuntimeException(t)}}, which is confusing when reading logs. Even if cache is
> bypassed, and the underlying page/filter/whatever throws some exception, it
> will appear as coming from the CacheFilter.
> I'd suggest simply {{throw th}} (unless perhaps for those cases covered by
> the if-block) - and yeah, non-runtime exceptions will need to be
> wrapped...but then again, they're the only ones we should catch here.
> Another approach would be to check with the {{i.m.m.c.Cache}} implementation
> which Exception the filter should handle.
> Lastly, we should probably document the fact that using the cache for other
> purposes than caching pages with the {{CacheFilter}} should probably imply
> handling those exceptions as well.
> Also see
> http://wiki.magnolia-cms.com/display/DEV/Concept+-+Cache+Improvements#Concept-CacheImprovements-Removeboilerplateandhidelockingconcerns
> for a related suggestion.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------