Skip to content

Commit

Permalink
TopicListController: обработка UserNotFoundException
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Apr 19, 2012
1 parent 51ee06f commit af0b380
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/ru/org/linux/topic/TopicListController.java
Expand Up @@ -19,11 +19,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.view.RedirectView;
Expand Down Expand Up @@ -886,5 +884,10 @@ private String calculateNavTitle(Section section, Group group, TopicListRequest
return navTitle.toString();
}

@ExceptionHandler(UserNotFoundException.class)
@ResponseStatus(HttpStatus.NOT_FOUND)
public ModelAndView handleUserNotFoundException() {
return new ModelAndView("errors/code404");
}

}

0 comments on commit af0b380

Please sign in to comment.