1 /* 2 MatchXpath 3 query = //LITERAL_THROWS[./IDENT[@text='Throwable' or @text='RuntimeException' or \ 4 ends-with(@text, 'Error')]] 5 message.matchxpath.match = Illegal throws statement 6 7 8 */ 9 10 package com.puppycrawl.tools.checkstyle.checks.coding.matchxpath; 11 12 public class InputMatchXpathIllegalThrows { 13 public void func1() throws RuntimeException {} // violation 14 public void func2() throws Exception {} 15 public void func3() throws Error {} // violation 16 public void func4() throws Throwable {} // violation 17 public void func5() throws NullPointerException {} 18 }