捕获异常错误


Catching Exceptions error

所以我首先从ipa文件(.plist文件)中提取一个文件,然后用https://github.com/rodneyrehm/CFPropertyList.

这是我的php脚本:-

<?php 
error_reporting( E_ALL );
ini_set( 'display_errors', 'on' );
namespace CFPropertyList;
?>

我想首先尝试分析二进制字符串,但失败,返回错误"致命错误:未捕获的异常'CFPropertyList''PListException',消息为'Invalid binary string!'"

我试过了:-

    catch('PListException $e)
    catch("CFPropertyList'PListException" $e)
    catch(CFPropertyList'PListException $e)

但它们都不起作用。有什么变通办法吗?

如果有疑问,您可以全包使用catch ('Exception $e)

相关文章: