code: public static WatchingException build(AbstractWisdomMojo mojo, Throwable exception) {
          String message = getLongMessage(mojo, exception);
          if (message == null) {
              // The extraction has failed.
              return new WatchingException(ERROR_TITLE, exception.getMessage(), null, exception);
          }
  
          if (message.contains("\n")) {
              message = message.substring(0, message.indexOf("\n")).trim();
          }
  
          final Matcher matcher = JAVA_COMPILATION_ERROR.matcher(message);
          if (matcher.matches()) {
              String path = matcher.group(1);
              String line = matcher.group(2);
              String character = matcher.group(3);
              String reason = matcher.group(4);
              File file = new File(path);
              return new WatchingException(ERROR_TITLE, reason, file, Integer.valueOf(line),
                      Integer.valueOf(character), null);
          } else {
              return new WatchingException(ERROR_TITLE, exception.getMessage(), null, exception);
          }
      }
docs: Creates a {@link org.wisdom.maven.WatchingException} object from the given Java compilation exception.
  
  @param mojo      the mojo
  @param exception the exception, thrown by the execution of the maven-compiler-plugin
  @return the watching exception