when you are using xdebug, exceptions message will never be shown if you use any encoding different than UTF-8, so if you are using any database with translated messages like oracle, you should ALWAYS, always, throw a exception like this
throw new Exception(utf8_encode($message),$code), character like ã,é,ç, will make the exception message fail to be shown, if you are not using xdebug ( I do think you should at least try), this code will not affect your page.
Exception
(PHP 5 >= 5.1.0)
導入
Exception は、すべての例外の基底クラスです。
クラス概要
Exception
{
/* プロパティ */
/* メソッド */
}プロパティ
- message
-
例外メッセージ
- code
-
例外コード
- file
-
例外が作られたファイル名
- line
-
例外が作られた行
目次
- Exception::__construct — 例外を作成する
- Exception::getMessage — 例外メッセージを取得する
- Exception::getPrevious — 前の例外を返す
- Exception::getCode — 例外コードを取得する
- Exception::getFile — 例外が発生したファイルを取得する
- Exception::getLine — 例外が発生した行を取得する
- Exception::getTrace — スタックトレースを取得する
- Exception::getTraceAsString — スタックトレースを文字列で取得する
- Exception::__toString — 例外の文字列表現
- Exception::__clone — 例外をコピーする
altieresdelsent at gmail dot com ¶
8 months ago
