Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1023678 // serve500

JavaX fragment (include)

ifdef NoNanoHTTPD
static virtual NanoHTTPD.Response serve500() {
  ret subBot_serve500();
}
static virtual NanoHTTPD.Response serve500(S msg) {
  ret subBot_serve500(msg);
}
endifdef

ifndef NoNanoHTTPD
static NanoHTTPD.Response serve500() {
  ret serve500("Internal Server Error");
}

static NanoHTTPD.Response serve500(S msg) {
  ret NanoHTTPD.newFixedLengthResponse(NanoHTTPD.Status.INTERNAL_ERROR, NanoHTTPD.MIME_PLAINTEXT, "Code 500 - " + msg);
}
endifndef

Author comment

Began life as a copy of #1001852

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023678
Snippet name: serve500
Eternal ID of this version: #1023678/3
Text MD5: e16ec53b138eac8db1e6e8c0e023177d
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-05 09:13:45
Source code size: 478 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 325 / 365
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)