* Stop Twig cache-directory write failures from flooding Sentry
Twig's FilesystemCache throws a raw \RuntimeException when it can't
create or write to the configured template cache directory (data/cache),
which happens whenever a host's file permissions are wrong. That
exception was completely uncaught, so every affected visitor got a raw
500 and every occurrence was reported to Sentry as a code bug even
though it's a host misconfiguration we can't fix from within the app -
this is the same class of noise fixed for the cache backend in #4275,
just from a different code path (~60k events across 4 duplicate-shaped
Sentry issues: FOSSBILLING-EBW/J8N/EWG/EWV).
Box_App::convertCacheWriteFailure() now catches it in both
Box_AppClient::render() and Box_AppAdmin::render(), converts it into a
FOSSBilling\Exception with a new Cache-category error code (5002), and
rethrows anything else unchanged. ErrorPage marks 5002 report:false, so
Sentry stops seeing it while the visitor still gets a proper error page.
* Handle all three Twig cache-write failure messages, not just one
CodeRabbit review on #4277: Twig\Cache\FilesystemCache::write() throws
three different \RuntimeException messages for the same underlying
problem (missing/unwritable data/cache directory) - 'Unable to create
the cache directory', 'Unable to write in the cache directory', and
'Failed to write cache file'. convertCacheWriteFailure() only matched
the first, so the other two still fell through as raw, Sentry-reported
fatals. Match all three, with a regression case for each.
* Don't imply file permissions are the only cause of a cache write failure
CodeRabbit review on #4276 (same code as here): 'Failed to write cache
file' can also come from a full disk, a hit quota, or a read-only
mount, not just a permissions problem - the error message told the
admin to check permissions when that might not be the actual cause.
Broadened the wording to also point at disk space.