added try/catch block to Customer and Purchase constructors