exception handling and raising toast messages