Skip to content

Commit

Permalink
Add a servlet which throws IIOException
Browse files Browse the repository at this point in the history
  • Loading branch information
k-tamura committed Mar 2, 2017
1 parent 6229a96 commit 033d33c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.t246osslab.easybuggy.exceptions;

import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@SuppressWarnings("serial")
@WebServlet(urlPatterns = { "/iioe" })
public class IIOExceptionServlet extends HttpServlet {

protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
ImageIO.read(new File("not-exist-file-names"));
}
}
4 changes: 4 additions & 0 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@
<a href="fnfe" target="_blank">FileNotFoundException</a>:
<fmt:message key="function.description.exception"><fmt:param value="FileNotFoundException"/></fmt:message>
</p></li>
<li><p>
<a href="iioe" target="_blank">IIOException</a>:
<fmt:message key="function.description.exception"><fmt:param value="IIOException"/></fmt:message>
</p></li>
<li><p>
<a href="iae" target="_blank">IllegalArgumentException</a>:
<fmt:message key="function.description.exception"><fmt:param value="IllegalArgumentException"/></fmt:message>
Expand Down

0 comments on commit 033d33c

Please sign in to comment.