Fixed throw and catch exceptions