public Processor next() {
   try {
     return (Processor) (iterator.next());
   } catch (Throwable t) {
     if ("ServiceConfigurationError".equals(t.getClass().getSimpleName())) {
       log.error("proc.bad.config.file", t.getLocalizedMessage());
     } else {
       log.error("proc.processor.constructor.error", t.getLocalizedMessage());
     }
     throw new Abort(t);
   }
 }
 public boolean hasNext() {
   try {
     return iterator.hasNext();
   } catch (Throwable t) {
     if ("ServiceConfigurationError".equals(t.getClass().getSimpleName())) {
       log.error("proc.bad.config.file", t.getLocalizedMessage());
     }
     throw new Abort(t);
   }
 }
Example #3
0
 public boolean process(Set<? extends TypeElement> tes, RoundEnvironment renv) {
   try {
     if (renv.processingOver()) createSymbols();
   } catch (IOException e) {
     processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getLocalizedMessage());
   } catch (Throwable t) {
     Throwable cause = t.getCause();
     if (cause == null) cause = t;
     processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, cause.getLocalizedMessage());
   }
   return true;
 }