Examples of printLog()


Examples of ch.njol.skript.log.RetainingLogHandler.printLog()

          return false;
        }
      }
      final EntityData<?> type = EntityData.parseWithoutIndefiniteArticle("" + parseResult.regexes.get(0).group());
      log.clear();
      log.printLog();
      if (type == null || type.isPlural().isTrue())
        return false;
      this.type = type;
    } finally {
      log.stop();
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printLog()

  public static NonNullPair<SkriptEventInfo<?>, SkriptEvent> parseEvent(final String event, final String defaultError) {
    final RetainingLogHandler log = SkriptLogger.startRetainingLog();
    try {
      final NonNullPair<SkriptEventInfo<?>, SkriptEvent> e = new SkriptParser(event, PARSE_LITERALS, ParseContext.EVENT).parseEvent();
      if (e != null) {
        log.printLog();
        return e;
      }
      log.printErrors(defaultError);
      return null;
    } finally {
View Full Code Here

Examples of ch.njol.skript.log.RetainingLogHandler.printLog()

      v = exprs[0].getConvertedExpression(rt.getC());
      if (v == null) {
        log.printErrors("This function is declared to return " + rt.getName().withIndefiniteArticle() + ", but " + exprs[0].toString(null, false) + " is not of that type.");
        return false;
      }
      log.printLog();
    } finally {
      log.stop();
    }
    if (f.isSingle() && !v.isSingle()) {
      Skript.error("This function is defined to only return a single " + rt.toString() + ", but this return statement can return multiple values.");
View Full Code Here

Examples of org.fao.geonet.kernel.harvest.harvester.HarvestError.printLog()

    catch(JDOMException e)
    {
            HarvestError harvestError = new HarvestError(e, log);
            harvestError.setDescription("Skipping metadata with bad XML format. Remote id : "+ ri.id);
            harvestError.printLog(log);
            this.errors.add(harvestError);
      result.badFormat++;
    }

    catch(Exception e)
View Full Code Here

Examples of org.fao.geonet.kernel.harvest.harvester.HarvestError.printLog()

    catch(Exception e)
    {
            HarvestError harvestError = new HarvestError(e, log);
            harvestError.setDescription("Raised exception while getting metadata file : "+ e);
            this.errors.add(harvestError);
            harvestError.printLog(log);
      result.unretrievable++;
    }

    //--- we don't raise any exception here. Just try to go on
    return null;
View Full Code Here

Examples of org.fao.geonet.kernel.harvest.harvester.HarvestError.printLog()

    catch (Exception e)
    {
            HarvestError harvestError = new HarvestError(e, log);
            harvestError.setDescription("Cannot convert oai_dc to dublin core : "+ e);
            this.errors.add(harvestError);
            harvestError.printLog(log);
      return null;
    }
  }

  //--------------------------------------------------------------------------
View Full Code Here

Examples of org.fao.geonet.kernel.harvest.harvester.HarvestError.printLog()

                        if(log.isDebugEnabled()) log.debug("After transform: "+Xml.getString(md));
          } catch (Exception e) {
              HarvestError error = new HarvestError(e, log);
              error.setDescription("Cannot transform XML, ignoring. Error was: "+e.getMessage());
            this.errors.add(error);
            error.printLog(log);
            result.badFormat++;
            continue; // skip this one
          }
        }
View Full Code Here

Examples of org.fao.geonet.kernel.harvest.harvester.HarvestError.printLog()

          uuid = dataMan.extractUUID(schema, md);
        } catch (Exception e) {
                    HarvestError error = new HarvestError(e, log);
                    error.setDescription("Unable to extract UUID. " + e.getMessage());
                    this.errors.add(error);
                    error.printLog(log);
        }

        if (uuid == null || uuid.equals("")) {
          log.warning("Skipping metadata due to failure extracting uuid (uuid null or empty).");
          result.unretrievable++;
View Full Code Here

Examples of org.fao.geonet.kernel.harvest.harvester.HarvestError.printLog()

                }
                catch (Exception e) {
                    HarvestError error = new HarvestError(e, log);
                    error.setDescription("Unable to insert metadata. "+e.getMessage());
                    this.errors.add(error);
                    error.printLog(log);
          result.couldNotInsert++;
          continue;
        }

                addPrivileges(id, params.getPrivileges(), localGroups, dataMan, context, log);
View Full Code Here

Examples of org.fao.geonet.kernel.harvest.harvester.HarvestError.printLog()

    catch(Exception e)
    {
            HarvestError error = new HarvestError(e, log);
            error.setDescription("Raised exception when searching : "+ e);
            this.errors.add(error);
            error.printLog(log);
      throw new OperationAbortedEx("Raised exception when searching", e);
    }
  }

    public List<HarvestError> getErrors() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.