Return error messages returned by exception
This commit is contained in:
parent
fd3d9e0366
commit
c9f998b642
@ -185,7 +185,7 @@ public class NanoHTTPDWebserver extends NanoHTTPD {
|
||||
}
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
res = newFixedLengthResponse(Response.Status.FORBIDDEN, NanoHTTPD.MIME_PLAINTEXT, "FORBIDDEN: Reading file failed.");
|
||||
res = newFixedLengthResponse(Response.Status.FORBIDDEN, NanoHTTPD.MIME_PLAINTEXT, ioe.getMessage());
|
||||
}
|
||||
|
||||
return res;
|
||||
|
Loading…
Reference in New Issue
Block a user