src/main/java/br/eng/joaofaro/taskmanager/repository/service/TaskService.java
/**
     * <p>Method responsible to delete a <code>task</code></p>
     * @param id - Task id
     * @param user - Task user
     * @throws TaskManagerException - throws a exception to handle result
     */
Method responsible to delete a task
@param id - Task id
@param user - Task user
@throws TaskManagerException - throws a exception to handle result
Method responsible to delete a task @param id - Task id @param user - Task user @throws TaskManagerException - throws a exception to handle result
public void deleteBy(Long id, AccountUser user) throws TaskManagerException {
        log.info("Trying to delete task from database");
        try {
            repository.deleteByIdAndUser(id, user);
            log.info("Task deleted successfuly from database");
        }catch (Exception e) {
            log.error("Error when trying to delete task from database: {}", e.getMessage());
            throw new TaskManagerException("Error when trying to delete task from database: " + e.getMessage());
        }
    }
public void deleteBy ( Long id , AccountUser user ) throws TaskManagerException { log . info ( "Trying to delete task from database" ) ; try { repository . deleteByIdAndUser ( id , user ) ; log . info ( "Task deleted successfuly from database" ) ; } catch ( Exception e ) { log . error ( "Error when trying to delete task from database: {}" , e . getMessage ( ) ) ; throw new TaskManagerException ( "Error when trying to delete task from database: " + e . getMessage ( ) ) ; } }
<p>Method responsible to delete a <code>task</code></p>
 @param id - Task id
 @param user - Task user
 @throws TaskManagerException - throws a exception to handle result
<p > Method responsible to delete a <code > task< / code > < / p > @param id - Task id @param user - Task user @throws TaskManagerException - throws a exception to handle result