Added exception support