CakeFest 2024: The Official CakePHP Conference

RarException::isUsingExceptions

(PECL rar >= 2.0.0)

RarException::isUsingExceptions例外によるエラー処理を使っているかどうかを調べる

説明

public static RarException::isUsingExceptions(): bool

RAR 関数が警告を発してエラー値を返すようになっているか、 あるいは例外をスローするようになっているかを調べます (引数の型を間違えるなどのプログラム上のエラーは含めません)。

パラメータ

この関数にはパラメータはありません。

戻り値

例外を使っている場合に true、それ以外の場合に false を返します。

例1 RarException::isUsingExceptions() の例

<?php
// デフォルトでは例外を使いません
var_dump(RarException::isUsingExceptions());
?>

上の例の出力は、 たとえば以下のようになります。

bool(false)

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top