View Javadoc
1   package com.github.triceo.splitlog.splitters.exceptions;
2   
3   import java.util.regex.Matcher;
4   
5   class StackTraceEndParser extends ExceptionLineParser<StackTraceEndLine> {
6   
7       @Override
8       public StackTraceEndLine parse(final String line) {
9           final Matcher m = this.getMatcher("... (\\d+) common frames omitted", line);
10          if (!m.matches()) {
11              final Matcher m2 = this.getMatcher("... (\\d+) more", line);
12              if (!m2.matches()) {
13                  return null;
14              } else {
15                  return new StackTraceEndLine(Integer.parseInt(m2.group(1)));
16              }
17          } else {
18              return new StackTraceEndLine(Integer.parseInt(m.group(1)));
19          }
20      }
21  
22  }