Examples of AssertException


Examples of org.olat.core.logging.AssertException

  public static Command createParentRedirectForExternalResource(String redirectMapperURL) {
    JSONObject root = new JSONObject();
    try {
      root.put("rurl", redirectMapperURL);
    } catch (JSONException e) {
      throw new AssertException("wrong data put into json object", e);
    }
    Command c = new Command(5);
    c.setSubJSON(root);
    return c;
 
View Full Code Here

Examples of org.olat.core.logging.AssertException

  /* (non-Javadoc)
   * @see org.olat.core.service.ServiceCreatorFactory#createNonNullServiceFor(java.lang.Class)
   */
  public Object createNonNullServiceFor(Class serviceInterfaceName) {
    ServiceCreator sc = serviceCreators.get(serviceInterfaceName.getName());
    if (sc == null) throw new AssertException("service '"+serviceInterfaceName.getName()+"' does not exist!");
    return sc.createService();
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

   *
   * @param value The value to set
   * @throws OLATRuntimeException if value.length > maxLength
   */
  public void setValue(String value) {
    if (value != null && value.length() > this.maxLength) { throw new AssertException("Value of TextElement(name:"+getName()+")(" + value.length()
        + ") was longer than allowed maxLength (" + this.maxLength + ")"); }
    super.setValue(value);
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

    super(1); // do not change this command id, it is in js also
    JSONObject subjo = new JSONObject();
    try {
      subjo.put("e", javaScriptCode);
    } catch (JSONException e) {
      throw new AssertException("json exception:", e);
    }
    setSubJSON(subjo);   
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

      while (!foundKey && j < ksi) {
        String eKey = keys[j];
        if (eKey.equals(key)) foundKey = true;
        j++;
      }
      if (!foundKey) throw new AssertException("submitted key '"+key+"' was not found in the keys of formelement named "+this.getName()+" , keys="+Arrays.asList(keys));
      selected.add(key);
    }
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

        Tracing.logInfo("SERVICE OK:" + sd.getServiceClassName()+" v"+sd.getMajorVersion()+"."+sd.getMinorVersion()+" description: "+sd.getDescription(), this.getClass());
      }
    }
   
    if (e != null) {
      throw new AssertException("invalid service: name '"+sd.getServiceClassName()+"' , spring exception = "+e);
    }
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

  public MediaResourceMapper() {
  //
  }

  public MediaResource handle(String relPath, HttpServletRequest request) {
    if (mediaResource == null) throw new AssertException("mr already served, relPath =" + relPath + ",");
    MediaResource r = mediaResource;
    mediaResource = null;
    return r;
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

  /**
   * @param mediaResource The mediaResource to set.
   */
  public void setMediaResource(MediaResource mediaResource) {
    if (this.mediaResource != null) throw new AssertException("mediaresource not yet served!");
    this.mediaResource = mediaResource;
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

   * [used by spring]
   *
   */
  public void init() {
    if (rootConfig == null) {
      throw new AssertException("rootConfig property must not be null!");
    }
    rootCacheWrapperImpl = new ClusterCacheWrapperImpl(this, this.getClass().getName(), rootConfig)
    eventBus.registerFor(this, null, ORES_THIS);
  }
View Full Code Here

Examples of org.olat.core.logging.AssertException

    // needed for spring
  }
 
  public void init() {
    if (rootConfig == null) {
      throw new AssertException("rootConfig property must not be null!");
    }
    rootCacheWrapperImpl = new CacheWrapperImpl(this.getClass().getName(), rootConfig)
  }
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.