| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
RarException::setUsingExceptions(PECL rar >= 2.0.0) RarException::setUsingExceptions — 例外によるエラー処理の有効化および無効化を行う 説明
public static void RarException::setUsingExceptions
( bool
$using_exceptions
)
引数に 例外は次のエラーのときにもスローされます。これらはライブラリの外部で発生します (エラーコードは -1 です)。
パラメータ
例
例1 RarException::setUsingExceptions() の例
<?php 上の例の出力は、 たとえば以下のようになります。 bool(false) Warning: RarArchive::open(): Failed to open does_not_exist.rar: ERAR_EOPEN (file open error) in C:\php_rar\trunk\tests\test.php on line 3 bool(false) bool(true) Fatal error: Uncaught exception 'RarException' with message 'unRAR internal error: Failed to open does_not_exist.rar: ERAR_EOPEN (file open error)' in C:\php_rar\trunk\tests\test.php:8 Stack trace: #0 C:\php_rar\trunk\tests\test.php(8): RarArchive::open('does_not_exist....') #1 {main} thrown in C:\php_rar\trunk\tests\test.php on line 8 |
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「RarException::setUsingExceptions - 例外によるエラー処理の有効化および無効化を行う」をGoogle検索
|