forked from psi-probe/psi-probe
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[config] Add exception handler controller
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
psi-probe-core/src/main/java/psiprobe/controllers/error/ExceptionHandlerController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Licensed under the GPL License. You may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.gnu.org/licenses/old-licenses/gpl-2.0.html | ||
* | ||
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
* WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | ||
* PURPOSE. | ||
*/ | ||
package psiprobe.controllers.error; | ||
|
||
import org.springframework.web.bind.annotation.ControllerAdvice; | ||
import org.springframework.web.bind.annotation.ExceptionHandler; | ||
|
||
@ControllerAdvice | ||
public class ExceptionHandlerController { | ||
|
||
@ExceptionHandler(Exception.class) | ||
public String handleException(Exception e) { | ||
return "/WEB-INF/jsp/errors/servleterror.jsp"; | ||
} | ||
|
||
} |