Java 8 RuntimeErrorException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 RuntimeErrorException class.

This code example shows how to use the following methods:
            image = blankImage;
        } else { 
            try { 
                image = ImageIO.read(file);
            } catch (IOException e) {
                throw new RuntimeErrorException(null, "Could not read image " + file);
            } 
        } 
    } 
 
    public Image(String fname) {
        this(new File(fname));
    } 
 
    public Image(String fname, double cx, double cy) {
        this(new File(fname));
        this.x = cx;
        this.y = cy;
    } 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 
	@Override 
	public void setPlanner(OOMDPPlanner planner) { 
		 
		if(!(planner instanceof DeterministicPlanner)){ 
			throw new RuntimeErrorException(new Error("Planner is not a Deterministic Planner")); 
		} 
		 
		this.dp = (DeterministicPlanner)planner; 
		 
	} 
	 
	@Override 
	public AbstractGroundedAction getAction(State s) { 
		 
		if(this.dp == null){ 
			throw new RuntimeException("The planner used by this Policy is not defined; therefore, the policy is undefined."); 
		} 
		 
		if(this.dp.hasCachedPlanForState(s)){ 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        } 
        catch (IllegalAccessException e) {
            throw new ReflectionException(e, "IllegalAccessException occurred while invoking " + toSimpleName(method));
        } 
        catch (Error err) {
            throw new RuntimeErrorException(err, "Error occurred while invoking " + toSimpleName(method));
        } 
        catch (Exception e) {
            throw new ReflectionException(e, "Exception occurred while invoking " + toSimpleName(method));
        } 
    } 
 
    private static String toSimpleName(Method method)
    { 
        return new Signature(method).toString();
    } 
 
    public static boolean isGetter(Method method)
    { 
        String methodName = method.getName();
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		} 
		else if(this.type == AttributeType.DOUBLEARRAY){
			return new DoubleArrayValue(this);
		} 
		 
		throw new RuntimeErrorException(new Error("Unknown attribute type; cannot construct a corresponding Value for it."));
	} 
	 
	@Override 
	public boolean equals(Object obj){ 
		Attribute op = (Attribute)obj;
		if(op.name.equals(name))
			return true; 
		return false; 
	} 
	 
	 
	@Override 
	public int hashCode(){ 
		return name.hashCode();
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
                throw new RuntimeErrorException(
                        (Error) targetException,
                        "Error occured while invoking " + toSimpleName(method));
            } 
            else { 
                throw new RuntimeErrorException(
                        new AssertionError(targetException),
                        "Unexpected throwable occured while invoking " + toSimpleName(method));
            } 
        } 
        catch (RuntimeException e) {
            throw new RuntimeOperationsException(e, "RuntimeException occured while invoking " + toSimpleName(method));
        } 
        catch (IllegalAccessException e) {
            throw new ReflectionException(e, "IllegalAccessException occured while invoking " + toSimpleName(method));
        } 
        catch (Error err) {
            throw new RuntimeErrorException(err, "Error occured while invoking " + toSimpleName(method));
        } 
        catch (Exception e) {
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 
	@Override 
	public void setPlanner(OOMDPPlanner planner) { 
		 
		if(!(planner instanceof DeterministicPlanner)){ 
			throw new RuntimeErrorException(new Error("Planner is not a Deterministic Planner")); 
		} 
		 
		this.dp = (DeterministicPlanner)planner; 
		 
	} 
	 
	 
	@Override 
	public AbstractGroundedAction getAction(State s) { 
		return dp.querySelectedActionForState(s); 
	} 
 
	@Override 
	public List<ActionProb> getActionDistributionForState(State s) { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
Throwable t = x.getTargetException();
         if (t instanceof RuntimeException)
            throw new RuntimeMBeanException((RuntimeException)t);
         else if (t instanceof Exception) throw new MBeanException((Exception)t);
         throw new RuntimeErrorException((Error)t);
      } 
   } 
 
   /** 
    * Returns the (public) method with the given name and signature on the given class. <br> 
    * Override to return non-public methods, or to map methods to other classes, or to map methods with 
    * different signatures 
    * @see #invoke(String, Class[], Object[]) 
    * @see #invokeMethod 
    */ 
   protected Method findMethod(Class cls, String name, Class[] params) throws NoSuchMethodException
   { 
      return cls.getMethod(name, params);
   } 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
                t = e;
            if (t instanceof RuntimeException)
                throw new RuntimeOperationsException
                    ((RuntimeException) t, "Exception invoking method " + name);
            else if (t instanceof Error)
                throw new RuntimeErrorException
                    ((Error) t, "Error invoking method " + name);
            else 
                throw new MBeanException
                    (e, "Exception invoking method " + name);
        } catch (Exception e) {
            throw new MBeanException
                (e, "Exception invoking method " + name);
        } 
 
        // Return the results of this method invocation 
        // FIXME - should we validate the return type? 
        return (result); 
    } 
 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
                t = e;
            if (t instanceof RuntimeException)
                throw new RuntimeOperationsException
                    ((RuntimeException) t, "Exception invoking method " + name);
            else if (t instanceof Error)
                throw new RuntimeErrorException
                    ((Error) t, "Error invoking method " + name);
            else 
                throw new MBeanException
                    (e, "Exception invoking method " + name);
        } catch (Exception e) {
            throw new MBeanException
                (e, "Exception invoking method " + name);
        } 
 
        // Return the results of this method invocation 
        // FIXME - should we validate the return type? 
        return (result); 
    } 
 
2
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		{ 
			return dataSources.get(dataSourceId).getConnection();
		} 
		else 
		{ 
			throw new RuntimeErrorException(null, "No dataSouce found for dataSourceId : " + dataSourceId);
		} 
	} 
 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 RuntimeErrorException Methods: