trycatchのやり方について
[About how to trycatch]
通常のtrycatchのやり方[How to do a normal trycatch]
try {
//Description of process
}catch (Exception $e) {
echo 'Captured Exceptions: ', $e->getMessage(), "\n";
}
①弊社のtrycatchのやり方[Our trycatch methodology]
catchには、弊社が用意しているSTATIC_UNEXPECTED_LOGGERクラスの【logsMessageAndMore】を使用して、
例外時のメッセージやエラーログの保存を行います。
また、catchされたら例外の内容を表示する画面に遷移します。
Use logsMessageAndMore(); method that we provide to catch and
It saves the message and error log at the time of exception.
Also, when caught, it will move to the screen displaying the exception.
try {
//Description of process
}catch (Exception $e) {
STATIC_UNEXPECTED_LOGGER::logsMessageAndMore($e, "~Failed to ~.");
}
②エラーログ[error log]
エラーログは、【log_unexpected】テーブルに保存されます。
[Error logs are stored in the 【log_unexpected】 table.]

③エラー内容が表示される画面[Screen displaying error details]
この画面では、エラーメッセージやスタックトレース情報を表示されます。
This screen displays error messages and stack trace information.
