Package org.olat.core.logging

Examples of org.olat.core.logging.OLATRuntimeException


    File fResource = getFileResource(res, resourceFolderName);
    if (fResource == null) return null;
    try {
      return addFileResource(fResource, fResource.getName());
    } catch (AddingResourceException e) {
      throw new OLATRuntimeException(FileResourceManager.class, "Error while trying to copy resource with name: " + fResource.getName(), e);
    }
  }
View Full Code Here


    else if (item.getItemType().equals(QTIItemObject.TYPE.B)){
      eItem = new QTIExportItem(qtir, item);
      eItem.setConfig((QTIExportFIBItemFormatConfig) configs.get(QTIExportFIBItemFormatConfig.class));
    }     
    else{
      throw new OLATRuntimeException(null,"Can not resolve QTIItem type", null);
    }
    return eItem;
  }
View Full Code Here

    }
    else if (item.getItemType().equals(QTIItemObject.TYPE.B)){
      config = (QTIExportFIBItemFormatConfig) configs.get(QTIExportFIBItemFormatConfig.class);
    }   
    else{
      throw new OLATRuntimeException(null,"Can not resolve QTIItem type", null);
    }
    return config;
  }
View Full Code Here

    // generate course base path
    String relPath = File.separator + COURSE_ROOT_DIR_NAME + File.separator + getResourceableId().longValue();
    courseRootContainer = new OlatRootFolderImpl(relPath, null);
    File fBasePath = courseRootContainer.getBasefile();
    if (!fBasePath.exists() && !fBasePath.mkdirs())
      throw new OLATRuntimeException(this.getClass(), "Could not create course base path:" + courseRootContainer, null);
  }
View Full Code Here

  protected OlatRootFolderImpl getIsolatedCourseFolder() {
    // create local course folder
    OlatRootFolderImpl isolatedCourseFolder = new OlatRootFolderImpl(courseRootContainer.getRelPath() + File.separator + COURSEFOLDER, null);
    // generate course folder
    File fCourseFolder = isolatedCourseFolder.getBasefile();
    if (!fCourseFolder.exists() && !fCourseFolder.mkdirs()) throw new OLATRuntimeException(this.getClass(),
        "could not create course's coursefolder path:" + fCourseFolder.getAbsolutePath(), null);
   
    QuotaManager qm = QuotaManager.getInstance();
    Quota q = qm.getCustomQuota(isolatedCourseFolder.getRelPath());
    if (q == null){
View Full Code Here

    // classification
    switch (classification.getSelected()) {
      case 0: event.setClassification(KalendarEvent.CLASS_PRIVATE); break;
      case 1: event.setClassification(KalendarEvent.CLASS_X_FREEBUSY); break;
      case 2: event.setClassification(KalendarEvent.CLASS_PUBLIC); break;
      default: throw new OLATRuntimeException("getSelected() in KalendarEntryForm.classification returned weitrd value", null);
    }

    // recurrence
    if (!chooseRecurrence.getSelectedKey().equals(RECURRENCE_NONE)) {
      String rrule = CalendarUtils.getRecurrenceRule(chooseRecurrence.getSelectedKey(), recurrenceEnd.getDate());
View Full Code Here

      // dragging for leafs and nodes, but only when configured
      node.put(AjaxTreeNode.CONF_ALLOWDRAG, allowDragNdrop);
      // top zones only for nodes
      node.put(AjaxTreeNode.CONF_ALLOWDROP, (allowDragNdrop && catalogEntry.getType() == CatalogEntry.TYPE_NODE));
    } catch (JSONException e) {
      throw new OLATRuntimeException("Error while creating AjaxTreeNode for catalog entry::" + catalogEntry, e);
    }
   
    return node;
  }
View Full Code Here

   * @return ScoreEvaluation
   */
  public ScoreEvaluation evalCourseNode(AssessableCourseNode cn) {
    // make sure we have no circular calculations
    recursionCnt++;
    if (recursionCnt > 15) throw new OLATRuntimeException("scoreaccounting.stackoverflow",
        new String[]{cn.getIdent(), cn.getShortTitle()},
        Util.getPackageName(ScoreAccounting.class),
        "stack overflow in scoreaccounting, probably circular logic: acn ="
        + cn.toString(), null);

View Full Code Here

    AssessableCourseNode acn = (AssessableCourseNode) foundNode;
    ScoreEvaluation se = evalCourseNode(acn);
    if (se == null) { // the node could not provide any sensible information on scoring. e.g. a STNode with no calculating rules
      String msg = "could not evaluate node " + acn.getShortTitle() + " (" + acn.getIdent() + ")" + "; called by node "
          + (evaluatingCourseNode == null ? "n/a" : evaluatingCourseNode.getShortTitle() + " (" + evaluatingCourseNode.getIdent() + ")");
      new OLATRuntimeException(ScoreAccounting.class, "scoreaccounting.evaluationerror.score",
          new String[]{acn.getIdent(), acn.getShortTitle()},
          Util.getPackageName(ScoreAccounting.class),
          msg, null);
    }
    Float score = se.getScore();
View Full Code Here

    }
    AssessableCourseNode acn = (AssessableCourseNode) foundNode;
    ScoreEvaluation se = evalCourseNode(acn);
    if (se == null) { // the node could not provide any sensible information on scoring. e.g. a STNode with no calculating rules
      String msg = "could not evaluate node '" + acn.getShortTitle() + "' (" + acn.getClass().getName() + "," + childId + ")";
      new OLATRuntimeException(ScoreAccounting.class, "scoreaccounting.evaluationerror.score",
          new String[]{acn.getIdent(), acn.getShortTitle()},
          Util.getPackageName(ScoreAccounting.class),
          msg, null);
    }
    Boolean passed = se.getPassed();
View Full Code Here

TOP

Related Classes of org.olat.core.logging.OLATRuntimeException

Copyright © 2018 www.massapicom. 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.