Libraryless. Click here for Pure Java version (2886L/17K).
1 | // Use like this: failWithVars(+x, +y); |
2 | // Or: failWithVars("bla", +x);
|
3 | static RuntimeException failWithVars(O... _) {
|
4 | S msg = ""; |
5 | if (odd(l(_))) {
|
6 | msg = str(first(_)); |
7 | _ = dropFirst(_); |
8 | } |
9 | ret fail(joinNemptiesWithColonSpace(msg, renderVars_str(_))); |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031357 |
| Snippet name: | failWithVars - put some variable values in fail msg |
| Eternal ID of this version: | #1031357/5 |
| Text MD5: | fc8e50b42023ca45a17b8b9d928d2e2e |
| Transpilation MD5: | 5f35ea10c77645fe27c3dc6e252befca |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-07 04:21:37 |
| Source code size: | 277 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 420 / 538 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |