Add exception handling in controller initialization.