Package org.olat.core.logging

Examples of org.olat.core.logging.OLATRuntimeException


      log.warn(null, e);
      // message could not be sent, however let user proceed with his action
      return true;
    }
    else {
      throw new OLATRuntimeException(ContactFormController.class, "" + cntctForm.getEmailTo(), e.getNextException());
    }
    // message could not be sent, return false
    return false;
  }
View Full Code Here


          }
          //everything when well so save the property
          dialogElmsMgr.addDialogElement(coursePropMgr, courseNode, element);
        } catch (Exception e) {
          //
          throw new OLATRuntimeException(DialogElementsController.class, "Error while adding new 'file discussion' element with filename: "+filename, e);
        }
      }
    } else if (source == confirmDeletionCtr) {
      if (DialogBoxUIFactory.isYesEvent(event)) {
        DialogCourseNode node = (DialogCourseNode) courseNode;
View Full Code Here

    if(publisher == null) return null;
    if(publisher.getData() != null && publisher.getData().startsWith("[")) return null;
   
    String type = publisher.getType();
    if (notificationUpgrades == null) {
      throw new OLATRuntimeException("No notification handler configured in the spring configuration. Fix the bean config for " + this.getClass().getName(), null);
    }
   
    NotificationsUpgrade upgrade = notificationUpgrades.get(type);
    if(upgrade == null) {
      log.error("No upgrader for publisher: " + publisher.getType());
View Full Code Here

        String subj = event.getSubject();
        if (subj.length() > MAX_SUBJECT_LENGTH )
          subj = subj.substring(0, MAX_SUBJECT_LENGTH) + "...";
        return subj;
    }
    throw new OLATRuntimeException("Unreacheable code.", null);
  }
View Full Code Here

    }

    // even if we do not show the menu, we need to build parse the manifest and
    // find the first node to display at startup
    VFSItem mani = rootContainer.resolve("imsmanifest.xml");
    if (mani == null || !(mani instanceof VFSLeaf)) { throw new OLATRuntimeException("error.manifest.missing", null, this.getClass()
        .getPackage().getName(), "CP " + rootContainer + " has no imsmanifest", null); }
    // initialize tree model in any case
    ctm = new CPManifestTreeModel((VFSLeaf) mani);

    if (showMenu) {
      // the menu is only initialized when needed.
      cpTree = new MenuTree("cpDisplayTree");
      cpTree.setTreeModel(ctm);
      cpTree.addListener(this);
    }

    LoggingResourceable nodeInfo = null;
    if (activateFirstPage) {
      // set content to first accessible child or root node if no children
      // available
      TreeNode node = ctm.getRootNode();
      if (node == null) throw new OLATRuntimeException(CPDisplayController.class, "root node of content packaging was null, file:"
          + rootContainer, null);
      while (node != null && !node.isAccessible()) {
        if (node.getChildCount() > 0) {
          node = (TreeNode) node.getChildAt(0);
        } else node = null;
View Full Code Here

          MediaFileElement mediaFileElement = new MediaFileElement(elem.getName(), p.getProperty(MEDIA_FILE_CREATED_BY), p.getProperty(MEDIA_FILE_CREATIONDATE));
          mediaFileElement.setDeletedBy(p.getProperty(MEDIA_FILE_DELETED_BY));
          mediaFileElement.setDeletionDate(p.getProperty(MEDIA_FILE_DELETIONDATE));
          files.put(p.getProperty(MEDIA_FILE_FILENAME), mediaFileElement);
        } catch (IOException e) {
          throw new OLATRuntimeException("Could'n read properties from media file: "+elem.getName(), e);
        }
      }
    }
    for (Iterator iter = filelist.iterator(); iter.hasNext();) {
      VFSLeaf elem = (VFSLeaf) iter.next();
View Full Code Here

      p.setProperty(MEDIA_FILE_CREATIONDATE, String.valueOf(System.currentTimeMillis()));
      p.setProperty(MEDIA_FILE_CREATED_BY, String.valueOf(author));
      try {
        p.store(metaFile.getOutputStream(false), "wiki media files meta properties");
      } catch (IOException e) {
        throw new OLATRuntimeException(WikiManager.class, "failed to save media files properties for file: " + filename +" and olatresource: " + ores.getResourceableId(), e);
      }
    }
  }
View Full Code Here

              p.setProperty(MEDIA_FILE_DELETED_BY, String.valueOf(ureq.getIdentity().getKey()));
              OutputStream os = metadata.getOutputStream(false);
              p.store(os, "wiki media file meta properties");
              os.close();
            } catch (IOException e) {
              throw new OLATRuntimeException("Could'n read properties from media file: "+metadata.getName(), e);
            }
          }
        }
      }
    }
View Full Code Here

      XMLParser xmlParser = new XMLParser(new IMSEntityResolver());
      doc = xmlParser.parse(in, false);
      in.close();
    }
    catch (IOException e) {
      throw new OLATRuntimeException(CPManifestTreeModel.class, "could not read and parse from file " + documentF, e);
    }
    finally {
      try {
        if (in != null)
          in.close();
View Full Code Here

    try {
      InputStream is =leaf.getInputStream();
      p.load(is);
      is.close();
    } catch (IOException e) {
      throw new OLATRuntimeException("Wiki page couldn't be read! Pagename:"+leaf.getName(), e);
    }
    String pageName = p.getProperty(WikiManager.PAGENAME);
    if(pageName == null){
      OLog log = Tracing.createLoggerFor(Wiki.class);
      log.warn("wiki properties page is persent but without content. Name:"+leaf.getName());
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.