In PHP 8 passing an invalid encoding to mb_convert_encoding raises a
ValueError (which extends from Error not Exception), so catch this andso fix the test to also
turn it into a normal Exception in order to preserve the interface ofcatch Throwable (but leave the explicit Exception case for PHP 5, which
phutil_utf8_convertlacks Throwable).