Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.InternalErrorException


    public void inferValueFromContext(String defaultValue) {
        try {
            setTypeEquals(BaseType.INT);
        } catch (IllegalActionException e) {
            // This should have been caught before.
            throw new InternalErrorException(e);
        }
        super.inferValueFromContext(defaultValue);
    }
View Full Code Here


            if (marker == null) {
                try {
                    new SingletonAttribute(_library, "_libraryMarker");
                } catch (KernelException ex) {
                    throw new InternalErrorException(
                            "Can't add library marker: " + ex);
                }
            }
        }
    }
View Full Code Here

                    }
                }
            }
        } catch (IllegalActionException ex) {
            // FIXME: This is a lousy way to report a syntax error.
            throw new InternalErrorException(ex);
        }
    }
View Full Code Here

            _sinkPortListVersion = workspace().getVersion();
            return _sinkPortList;
        } catch (IllegalActionException e) {
            // This is not ideal, but the base class doesn't
            // declare exceptions here.
            throw new InternalErrorException(e);
        }
    }
View Full Code Here

            _sourcePortListVersion = workspace().getVersion();
            return _sourcePortList;
        } catch (IllegalActionException e) {
            // This is not ideal, but the base class doesn't
            // declare exceptions here.
            throw new InternalErrorException(e);
        }
    }
View Full Code Here

            setScheduler(scheduler);
        } catch (Exception e) {
            // if setScheduler fails, then we should just set it to Null.
            // this should never happen because we don't override
            // setScheduler() to do sanity checks.
            throw new InternalErrorException(
                    "Could not create Default Scheduler:\n" + e.getMessage());
        }

        allowRateChanges.setToken(BooleanToken.TRUE);
        allowRateChanges.setVisibility(Settable.EXPERT);
View Full Code Here

    public synchronized void put(Token token) {
        try {
            IOPort port = getContainer();

            if (port == null) {
                throw new InternalErrorException(
                        "put() requires that the port has a container");
            }

            Parameter priority = (Parameter) port.getAttribute("priority");

            if (priority == null) {
                if (port.getContainer() == null) {
                    throw new InternalErrorException(
                            "put() requires that the port '"
                                    + port
                                    + "' that contains this receiver be itself "
                                    + "contained");
                }

                priority = (Parameter) port.getContainer().getAttribute(
                        "priority");
            }

            int priorityValue = 5;

            if (priority != null) {
                try {
                    priorityValue = ((IntToken) priority.getToken()).intValue();
                } catch (ClassCastException ex) {
                    throw new InternalErrorException(null, ex,
                            "priorityValue '" + priority.getToken()
                                    + "' must be an integer in "
                                    + getContainer());
                }
            }

            getDirector()._enqueueEvent(
                    new TMEvent(this, token, priorityValue, -1.0));
        } catch (IllegalActionException ex) {
            throw new InternalErrorException(null, ex, null);
        }
    }
View Full Code Here

            receiver._setCompletionTime(new Time(this, timeValue));
            receiver._lastTime = new Time(this);
        } catch (IllegalActionException e) {
            // If the time resolution of the director or the stop
            // time is invalid, it should have been caught before this.
            throw new InternalErrorException(e);
        }

        return receiver;
    }
View Full Code Here

        try {
            result = new RecordToken(labels, values);
        } catch (IllegalActionException e) {
            // Should not occur since we've ensured above that
            // nothing is null and the arrays have the same size.
            throw new InternalErrorException(e);
        }

        super.put(result);
    }
View Full Code Here

            } else {
                return _currentTime;
            }
        } catch (IllegalActionException exception) {
            // This should have been caught by now.
            throw new InternalErrorException(exception);
        }
    }
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.