aboutsummaryrefslogtreecommitdiff
path: root/website2/usageExamples/SneakyThrowsExample_pre.jpage
blob: be6d72d5ed0a6cddc7c3327bed2da171ee1e12ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import lombok.SneakyThrows;

public class SneakyThrowsExample implements Runnable {
	@SneakyThrows(UnsupportedEncodingException.class)
	public String utf8ToString(byte[] bytes) {
		return new String(bytes, "UTF-8");
	}
	
	@SneakyThrows
	public void run() {
		throw new Throwable();
	}
}