I need to diferences between different DatabaseException errors, when going from DatabaseError to DatabaseException the information regarding the error is lost, maybe the solution would be an inheritance of DatabaseException to wrap the DatabaseError object