Adding testing to possible exceptions.