diff options
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebServer.java')
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebServer.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebServer.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebServer.java index 3e91cfc5..6357e411 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebServer.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/WebServer.java @@ -31,7 +31,6 @@ import org.openslx.bwlp.thrift.iface.TNotFoundException; import org.openslx.util.GrowingThreadPoolExecutor; import org.openslx.util.Json; import org.openslx.util.Util; -import org.openslx.util.vm.UnsupportedVirtualizerFormatException; import org.simpleframework.xml.Serializer; import org.simpleframework.xml.core.Persister; @@ -167,7 +166,7 @@ public class WebServer extends NanoHTTPD { final LaunchData ld; try { ld = DbLecture.getClientLaunchData(lectureId); - } catch (UnsupportedVirtualizerFormatException | TNotFoundException e) { + } catch (TNotFoundException e) { // TODO better virt error handling return notFound(); } catch (SQLException e) { @@ -288,10 +287,15 @@ public class WebServer extends NanoHTTPD { /** * Helper for returning "Internal Server Error" Status + * @param body Message */ - public static Response internalServerError() { + public static Response internalServerError(String body) { return new NanoHTTPD.Response(NanoHTTPD.Response.Status.INTERNAL_ERROR, "text/plain", - "Internal Server Error"); + body); + } + + public static Response internalServerError() { + return internalServerError("Internal Server Error"); } /** |