exception handling in map class