Libraryless. Click here for Pure Java version (3518L/21K).
1 | svoid assertNoException(S msg default "", Runnable r) {
|
2 | try {
|
3 | r.run(); |
4 | } catch e {
|
5 | fail(msg, e); |
6 | } |
7 | } |
8 | |
9 | svoid assertNoException(Scorer scorer, S msg default "", Runnable r) {
|
10 | try {
|
11 | r.run(); |
12 | scorer.ok(msg); |
13 | } catch e {
|
14 | scorer.error(toPersistableThrowable(new RuntimeException(msg, e))); |
15 | } |
16 | } |
Began life as a copy of #1005129
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031635 |
| Snippet name: | assertNoException - assert that a code fragment runs without an exception (throwable) |
| Eternal ID of this version: | #1031635/2 |
| Text MD5: | de00849fe881f2097d0b61d30992100e |
| Transpilation MD5: | b7956f8a33245ad2fd6693bc9f90c905 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-24 19:26:03 |
| Source code size: | 334 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 371 / 463 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |