try {
// Code to be executed
} catch (error) {
// Code to execute there is an error
} finally {
// Optional – always execute this code
}
|
|
最適な方法として、できる限り try..catch を使用してください。
|