codecamp

PHP8 RarException::isUsingExceptions

(PECL rar >= 2.0.0)

RarException::isUsingExceptions — 检查是否正在使用带有异常的错误处理

说明

public static RarException::isUsingExceptions(): bool

检查 RAR 函数是否会发出警告并返回错误值,或者它们是否 在大多数情况下会抛出异常(不包括一些编程 错误,例如传递错误类型的参数)。

参数 

此函数没有参数。

返回值 

如果正在使用异常,则返回 true,否则返回 false。

示例 

示例 #1 RarException::isUsingExceptions() example

<?php
//The default is not to use exceptions
var_dump(RarException::isUsingExceptions());
?>

以上示例的输出类似于:

bool(false)

参见 

  • RarException::setUsingExceptions() - 激活和停用异常错误处理


PHP8 RarEntry::__toString
PHP8 RarException::setUsingExceptions
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定