Throw exception instead of logging in debug mode.
Merge pull request #4150 from ADmad/2.5-cachehelper-exception

Throw exception instead of logging in debug mode when view cache fails.