Results of 1 - 10 of about 196 for Throwable (0.001 sec.)
- Throwable | PHP 8.3 11841
- Throwable (PHP 7, PHP 8) はじめに Throwable は、 throw 文でスロー可能なあらゆるオブジェクトが実装する基底インターフェイスです。 Error や Exception も、これを実装しています。 注意 : PHP のクラスが Throwable インターフェイスを直接実装すること
... はできません。 そのかわりに、 Exception を継承する必要があります。 インターフェイス概要 interface Throwable extends Stringable { /* メソッド */ public function getMessage (): string public function getCode (): int public function ... e (): int public function getTrace (): array public function getTraceAsString (): string public function getPrevious (): ? Throwable public function __toString (): string /* 継承したメソッド */ public function Stringable::__toString (): string } 変更履歴 ... バージョン 説明 8.0.0 Throwable は、 Stringable を新たに実装しました。 目次 Throwable::getMessage — メッセージを取得する Throwable::getCode — 例外コードを ...
-
https://man.mtool.work/php/8.3/class.throwable.html
- Throwable::getPrevious — ひとつ前の Throwable を返す | PHP 8.3 11041
- Throwable::getPrevious (PHP 7, PHP 8) Throwable::getPrevious — ひとつ前の Throwable を返す 説明 public function Throwable::getPrevious (): ? Throwable ひとつ前の Throwable (たとえば Exception::__construct() の第三パラメータで指定したもの) を
... 返します。 パラメータ この関数にはパラメータはありません。 戻り値 ひとつ前の Throwable が存在すればそれを返します。 存在しない場合は null を返します。 参考 Exception::getPrevious() - 前の例外(Throwable)を返す ...
-
https://man.mtool.work/php/8.3/throwable.getprevious.html
- ReflectionClass::__construct — ReflectionClass を作成する | PHP 8.3 9451
- ReflectionClass::__construct (PHP 5, PHP 7, PHP 8) ReflectionClass::__construct — ReflectionClass を作成する 説明 public function ReflectionClass::__construct ( object | string $objectOrClass ) 新しい ReflectionClass オブジェクトを作成します
... ection ; ?> 上の例の出力は、 たとえば以下のようになります。 Class [ <internal:Core> class Exception implements Stringable, Throwable ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [7] { Property [ protected $mess ... tected string $file = '' ] Property [ protected int $line = 0 ] Property [ private array $trace = [] ] Property [ private ?Throwable $previous = NULL ] } - Methods [11] { Method [ <internal:Core> private method __clone ] { - Parameters [0] { } - Return [ ... 3] { Parameter #0 [ <optional> string $message = "" ] Parameter #1 [ <optional> int $code = 0 ] Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core> public method __wakeup ] { - Parameters [0] { } - Tentative return [ void ...
-
https://man.mtool.work/php/8.3/reflectionclass.construct.html
- Throwable エラー | PHP 8.3 8359
- Throwable エラー Throwable エラーとは、実行中に発生し、 通常の命令の流れを中断するイベントです。 Throwable エラーが throw されると、 catch ブロックでキャッチされるか、グローバルスコープに達するまで、 コールスタックが巻き戻されます。 巻き戻し
... の途中で finally ブロックが見つかった場合、それらはすべて実行されます。 キャッチされなかった Throwable エラーは、 set_exception_handler() で設定された例外ハンドラがあればそれに渡され、 なければ、プログラムは致命的なエラーで終 ... 了します。 PHP のコードから Throwable エラーをスローするには、 throw キーワードを使います。 ヒント Standard PHP Library (SPL) には、 さまざまな 組み込みの例外 が ... クラスを拡張する ことで、独自の例外を作成することもできます。 エラーをスローする可能性のあるコードを try ブロックで囲むと、 Throwable エラーを PHP のコード内で処理できます。 警告 Throwable オブジェクトはクローンできません。 このようなオブジェクトを clone し ...
-
https://man.mtool.work/php/8.3/language.error-handling.throwable.html
- Error::getPrevious — 直前の Throwable を返す | PHP 8.3 7743
- Error::getPrevious (PHP 7, PHP 8) Error::getPrevious — 直前の Throwable を返す 説明 final public function Error::getPrevious (): ? Throwable 直前の Throwable( Error::__construct() の第三パラメータ)を返します。 パラメータ この関数にはパラメ
... ータはありません。 戻り値 直前の Throwable が存在すればそれを返し、 そうでなければ null を返します。 例 例1 Error::getPrevious() の例 エラートレースをループし、出力し ... jori/ex.php:8 Something happened (911) [MyCustomError] /home/bjori/ex.php:6 You are doing it wrong! (112) [TypeError] 参考 Throwable::getPrevious() - ひとつ前の Throwable を返す 他のマニュアルの関連ページ Linux JM strnlen(3) ...
-
https://man.mtool.work/php/8.3/error.getprevious.html
- Exception::getPrevious — 前の例外(Throwable)を返す | PHP 8.3 7678
- Exception::getPrevious (PHP 5 >= 5.3.0, PHP 7, PHP 8) Exception::getPrevious — 前の例外(Throwable)を返す 説明 final public function Exception::getPrevious (): ? Throwable 前に発生した Throwable ( Exception::__construct() に渡された第三パラメ
... ータ) を返します。 パラメータ この関数にはパラメータはありません。 戻り値 前に発生した Throwable 、あるいはそれが存在しない場合は null を返します。 例 例1 Exception::getPrevious() の例 例外トレースをループし、表示します ... hing happened (911) [MyCustomException] /home/bjori/ex.php:6 You are doing it wrong! (112) [InvalidArgumentException] 参考 Throwable::getPrevious() - ひとつ前の Throwable を返す 他のマニュアルの関連ページ Linux JM strnlen(3) ...
-
https://man.mtool.work/php/8.3/exception.getprevious.html
- try...catch | PHP 8.3 7310
- try...catch try (PHP 5, PHP 7, PHP 8) try ブロックは、処理が必要な Throwable エラーを throw する可能性があるコードを囲むもので、 対応する catch ブロックあるいは finally ブロックが 必ず ひとつ以上必要です。 try ブロック内で Throwable エラーが
... れに渡され、 なければ、スクリプトは致命的なエラーで終了します。 catch (PHP 5, PHP 7, PHP 8) catch ブロックには、スローされた Throwable エラーにどのように対処するかを記述します。 このブロックには、処理できる Throwable のサブクラス (多くの場合は Exception 配下 ... のクラス) をひとつ以上指定します。 オプションで、例外を代入する変数も指定できます。 スローされた Throwable オブジェクトのクラスにマッチする 最初の catch ブロックが、そのエラーを処理します。 通常の実行はその catch ブロックの後から ... orld\n" ; 上の例の出力は以下となります。 Caught exception: Error Hello World PHP 7.1.0 以降では、 catch ブロックで処理する Throwable のサブクラスを、 パイプ文字 ( | ) を使った union で指定できるようになりました。 これは、異なるクラス階層に由来する異なる例 ...
-
https://man.mtool.work/php/8.3/control-structures.try-catch.html
- ImagickDrawException クラス | PHP 8.3 6953
- ImagickDrawException クラス (PECL imagick 3) はじめに クラス概要 class ImagickDrawException extends Exception implements Throwable { /* 継承したプロパティ */ protected string $ message = "" ; private string $ string = "" ; protected int $ c
... ode ; protected string $ file = "" ; protected int $ line ; private array $ trace = [] ; private ? Throwable $ previous = null ; /* 継承したメソッド */ public function Exception::__construct ( string $message = "" , int $code = 0 , ... ? Throwable $previous = null ) final public function Exception::getMessage (): string final public function Exception::getPrevious (): ... ? Throwable final public function Exception::getCode (): int final public function Exception::getFile (): string final public function ...
-
https://man.mtool.work/php/8.3/class.imagickdrawexception.html
- ImagickException クラス | PHP 8.3 6953
- ImagickException クラス (PECL imagick 3) はじめに クラス概要 class ImagickException extends Exception implements Throwable { /* 継承したプロパティ */ protected string $ message = "" ; private string $ string = "" ; protected int $ code ; pr
... otected string $ file = "" ; protected int $ line ; private array $ trace = [] ; private ? Throwable $ previous = null ; /* 継承したメソッド */ public function Exception::__construct ( string $message = "" , int $code = 0 , ... ? Throwable $previous = null ) final public function Exception::getMessage (): string final public function Exception::getPrevious (): ... ? Throwable final public function Exception::getCode (): int final public function Exception::getFile (): string final public function ...
-
https://man.mtool.work/php/8.3/class.imagickexception.html
- ImagickPixelException クラス | PHP 8.3 6953
- ImagickPixelException クラス (PECL imagick 3) はじめに クラス概要 class ImagickPixelException extends Exception implements Throwable { /* 継承したプロパティ */ protected string $ message = "" ; private string $ string = "" ; protected int $
... code ; protected string $ file = "" ; protected int $ line ; private array $ trace = [] ; private ? Throwable $ previous = null ; /* 継承したメソッド */ public function Exception::__construct ( string $message = "" , int $code = 0 , ... ? Throwable $previous = null ) final public function Exception::getMessage (): string final public function Exception::getPrevious (): ... ? Throwable final public function Exception::getCode (): int final public function Exception::getFile (): string final public function ...
-
https://man.mtool.work/php/8.3/class.imagickpixelexception.html