Blok try...catch menangkap kegagalan koneksi database atau operasi file tanpa mengekspos pesan error sistem internal ke publik.