@Override
    public void onException(Exception ex) {
      if (ex instanceof StopProcessing) {
        throw (StopProcessing) ex;
      } else if (ex instanceof SimException) {
        context.err.println("\nEXCEPTION FROM SIMULATION:");
        context.err.println(ex.getMessage() + "\n");
        context.err.println(((SimException) ex).getContext());
      } else if (ex instanceof ParseException) {
        context.err.println("\nPARSE ERROR:");
        ParseException parseException = (ParseException) ex;
        if (args.debug) {
          parseException.printStackTrace(context.err);
        } else {
          parseException.printContext(context.err);
        }
      } else {
        context.err.println("\nUNEXPECTED TOP-LEVEL EXCEPTION:");
        ex.printStackTrace(context.err);
      }
      errors.incrementAndGet();
    }
Callback class for processing input file bytes, produced by the ClassPathOpener.
android/android_framework/dex-maker/src/main/java/com/android/dx/command/dexer/Main.java