public void addContext(String str) {
    if (str == null) {
      throw new NullPointerException("str == null");
    }

    context.append(str);
    if (!str.endsWith("\n")) {
      context.append('\n');
    }
  }
Adds a line of context to this instance.

@param str {@code non-null;} new context
android/android_framework/dex-maker/src/main/java/com/android/dex/util/ExceptionWithContext.java