Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Benchmark
- public void throwException() throws IllegalArgumentException
- {
- throw new IllegalArgumentException("Hard-coded exception");
- }
- # Run progress: 0.00% complete, ETA 00:02:00
- # Fork: 1 of 3
- # Warmup Iteration 1: <failure>
- java.lang.IllegalArgumentException: Hard-coded exception
- [...]
- @Benchmark
- public void throwException(Blackhole bh)
- {
- try
- {
- throw new IllegalArgumentException("Hard-coded exception");
- }
- catch (IllegalArgumentException e)
- {
- bh.consume(e);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement