exception handling improvements.