コード例 #1
0
 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);
   }
 }
コード例 #2
0
 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);
   }
 }
コード例 #3
0
ファイル: CreateSymbols.java プロジェクト: GavinHwa/Douyu
 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;
 }