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

10
LINES

< > BotCompany Repo | #1000659 // fail functions (improved)

JavaX fragment (include)

java.lang.RuntimeException: java.io.IOException: Snippet #1000659 not found or not public
	at main.rethrow(m1008705.java:173)
	at main.loadSnippet(m1008705.java:342)
	at main.html2(m1008705.java:83)
	at main.html(m1008705.java:67)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at main.invokeMethod(m1008705.java:1601)
	at main.callOpt_withVarargs(m1008705.java:4387)
	at main.callOpt(m1008705.java:3326)
	at main.callHtmlMethod2(m1008705.java:11404)
	at main$MyHTTPD$1.get(m1008705.java:7337)
	at main$MyHTTPD$1.get(m1008705.java:1)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at main.invokeMethod(m1008705.java:1601)
	at main.safeCallF(m1008705.java:642)
	at main.callF(m1008705.java:611)
	at main$MyHTTPD.serve(m1008705.java:7373)
	at main$NanoHTTPD.serve_2(m1008705.java:9572)
	at main$NanoHTTPD.serve(m1008705.java:9553)
	at main$NanoHTTPD$HTTPSession.execute(m1008705.java:8453)
	at main$NanoHTTPD$ClientHandler.run(m1008705.java:7829)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: Snippet #1000659 not found or not public
	at main.loadSnippet_noResourceLoader(m1008705.java:395)
	at main.loadSnippet(m1008705.java:365)
	at main.loadSnippet(m1008705.java:341)
	... 21 more

Author comment

This is smartly declared so you can use either version:

  fail();
  throw fail();

(Actually JavaX, as of #752, now rewrites "fail()" to "throw fail()".)


// disabled for now to shorten some programs 
/*static RuntimeException fail(S msg, O... args) {
  throw new RuntimeException(format(msg, args));
}*/

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1000659
Snippet name: fail functions (improved)
Eternal ID of this version: #1000659/9
Text MD5: 2807eaf197b1e226e5c3d7b24e11fc52
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-09 19:50:04
Source code size: 561 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 2577 / 12092
Version history: 8 change(s)
Referenced in: #1000716 - confused functions
#1000905 - error functions
#1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1009495 - quickFail functions - throw RuntimeException without stack trace
#3000382 - Answer for ferdie (>> t = 1, f = 0)