Code example for PatternSyntaxException

Methods: getMessage

0
     */ 
    protected void compile(String pat) {
        try { 
            pattern = Pattern.compile(pat);
        } catch (final PatternSyntaxException x) {
            System.err.println(x.getMessage());     
        } 
    } 
     
    protected String join(final List<String> lines, final String prefix) {
        if (lines == null) {
            return ""; 
        } 
        final StringBuffer buf = new StringBuffer();
        for (final String line : lines) {
            buf.append(prefix + line);     
        } 
        return buf.toString();
    } 
     
    /**