Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.InternalErrorException


        if (remainingEntities.size() == 0) {
            try {
                setContainer(null);
            } catch (KernelException ex) {
                throw new InternalErrorException("Cannot remove directory!");
            }
        } else {
            if (remainingEntities.size() == 1) {
                // Check to see whether what remains is only the configuration.
                Object remaining = remainingEntities.get(0);

                if (remaining instanceof PtolemyEffigy) {
                    if (((PtolemyEffigy) remaining).getModel() instanceof Configuration) {
                        try {
                            setContainer(null);
                        } catch (KernelException ex) {
                            throw new InternalErrorException(
                                    "Cannot remove directory!");
                        }
                    }
                }
            }

            // Finally, we might have a case where none of the effigies in
            // the application have a tableau, in which case the application
            // no longer has a UI.  If this happens, then we want to remove
            // the directory, triggering the application to exit.
            boolean anyTableau = false;

            // Check to see if the remaining effigies have any tableaux.
            for (Iterator effigies = remainingEntities.iterator(); effigies
                    .hasNext()
                    && !anyTableau;) {
                Effigy effigy = (Effigy) effigies.next();

                if (effigy.numberOfOpenTableaux() > 0) {
                    anyTableau = true;
                }
            }

            // If we can't find any tableau for any of the effigies, then exi
            if (!anyTableau) {
                try {
                    // This gets reentrant...  Ugh..
                    for (Iterator effigies = remainingEntities.iterator(); effigies
                            .hasNext();) {
                        Effigy effigy = (Effigy) effigies.next();
                        effigy.setContainer(null);
                    }
                } catch (KernelException ex) {
                    throw new InternalErrorException("Cannot remove directory!");
                }
            }
        }
    }
View Full Code Here


            overwriteFiles = new Parameter(this, "overwriteFiles");
            overwriteFiles.setTypeEquals(BaseType.BOOLEAN);
            overwriteFiles.setExpression("true");

        } catch (Exception ex) {
            throw new InternalErrorException(this, ex,
                    "Problem setting up coSimulation parameter");
        }
    }
View Full Code Here

                        port.get(i);
                    }
                }
            } catch (NoTokenException ex) {
                // this shouldn't happen.
                throw new InternalErrorException(this, ex, null);
            }

        }
        return tokenHolder;
    }
View Full Code Here

            try {
                _functionDependency = new FunctionDependencyOfEnabledCompositeActor(
                        this);
            } catch (NameDuplicationException e) {
                // This should not happen.
                throw new InternalErrorException("Failed to construct a "
                        + "function dependency object for " + getFullName());
            } catch (IllegalActionException e) {
                // This should not happen.
                throw new InternalErrorException("Failed to construct a "
                        + "function dependency object for " + getFullName());
            }
        }

        return _functionDependency;
View Full Code Here

            }
        } catch (IllegalActionException ex) {
            // Errors in the initialValue parameter should already
            // have been caught in getAttribute() method of the base
            // class.
            throw new InternalErrorException("Bad initialValue value!");
        }

        return typeConstraints;
    }
View Full Code Here

            }
        } catch (IllegalActionException ex) {
            // Errors in the initialValue parameter should already
            // have been caught in getAttribute() method of the base
            // class.
            throw new InternalErrorException("Bad initialValue value!");
        }

        return typeConstraints;
    }
View Full Code Here

                }

                director.fireAt(_self, firingTime);
            } catch (IllegalActionException ex) {
                // Should never happen
                throw new InternalErrorException(ex.getMessage());
            }
        }
View Full Code Here

        Map result = null;
        try {
            result = _getOrPutTokens(receivers, null, director, null, null,
                    GET_FROM_ALL);
        } catch (IllegalActionException ex) {
            throw new InternalErrorException(ex);
        }

        Token[][] tokens = new Token[receivers.length][];

        for (int i = 0; i < receivers.length; i++) {
View Full Code Here

                    }
                }
            }
        }

        throw new InternalErrorException("No token is received.");
    }
View Full Code Here

                if (receiver._symmetricGetReceivers == null) {
                    _zeroInDegree.add(receiver);
                }
            }
            if (_zeroInDegree.isEmpty()) {
                throw new InternalErrorException("No entry point.");
            }
        }
View Full Code Here

TOP

Related Classes of ptolemy.kernel.util.InternalErrorException

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.