implementing exceptions for DAO