diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java index 447f4a43..c34281f1 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -29,6 +29,7 @@ import com.wisemapping.service.UserService; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.dao.DataAccessException; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -133,10 +134,11 @@ public class AdminController extends BaseController { public void purgeDB(@RequestParam(required = true) Integer muid, @RequestParam(required = true) Boolean apply) throws UnsupportedEncodingException, WiseMappingException { for (int i = 0; i < muid; i++) { + System.out.println("looking for user:" + i); User user; try { user = userService.getUserBy(i); - } catch (Exception e) { + } catch (DataAccessException e) { // User does not exit's continue ... continue; }