Package org.apache.harmony.jpda.tests.framework

Examples of org.apache.harmony.jpda.tests.framework.TestErrorException


        thrd.setDaemon(true);
        thrd.start();
        try {
            thrd.join(settings.getTimeout());
        } catch (InterruptedException e) {
            throw new TestErrorException(e);
        }

        if (thrd.isAlive()) {
            thrd.interrupt();
        }

        try {
            int exitCode = process.exitValue();
            logWriter.println("Finished debuggee with exit code: " + exitCode);
        } catch (IllegalThreadStateException e) {
            logWriter.printError("Terminate debugge process");
            process.destroy();
            throw new TestErrorException("Debuggee process did not finish during timeout", e);
        }

        // dispose any resources of the process
        process.destroy();
    }
View Full Code Here


     * @param p array of bytes for new packet.
     */
    public Packet(byte p[]) {
        length = (int) readFromByteArray(p, LENGTH_INDEX, INT_SIZE);
        if (length < HEADER_SIZE) {
            throw new TestErrorException(
                    "Packet creation error: size of packet = " + length
                            + "is less than header size = " + HEADER_SIZE);
        }
        id = (int) readFromByteArray(p, ID_INDEX, INT_SIZE);
        flags = p[FLAGS_INDEX];
View Full Code Here

        }
        case JDWPConstants.Tag.NO_TAG: {
            return true;
        }
        default: {
            throw new TestErrorException("Improper JDWP.tag value = " + tag);
        }
        }
    }
View Full Code Here

        byte data_temp[] = data;
        byte val_as_bytes[];
        try {
            val_as_bytes = val.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new TestErrorException(e);
        }
        int new_data_size = data.length + val_as_bytes.length
                + TypesLengths.getTypeLength(TypesLengths.INT_ID);
        data = new byte[new_data_size];
        System.arraycopy(data_temp, 0, data, 0, new_data_size
View Full Code Here

        int string_length = this.getNextValueAsInt();
        String res = null;
        try {
            res = new String(data, reading_data_index, string_length, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new TestErrorException(e);
        }
        reading_data_index = reading_data_index + string_length;
        return res;
    }
View Full Code Here

     *            the ObjectID value.
     */
    public void setNextValueAsObjectID(long val) {
        if (TypesLengths.getTypeLength(TypesLengths.OBJECT_ID) < 0
                || TypesLengths.getTypeLength(TypesLengths.OBJECT_ID) > 8) {
            throw new TestErrorException("Improper ObjectID value length = "
                    + TypesLengths.getTypeLength(TypesLengths.OBJECT_ID));
        }
        int new_data_size = data.length
                + TypesLengths.getTypeLength(TypesLengths.OBJECT_ID);
        byte data_temp[] = data;
View Full Code Here

     * @return the next value of the data of the Packet as VM-sensitive value.
     */
    public long getNextValueAsObjectID() {
        if (TypesLengths.getTypeLength(TypesLengths.OBJECT_ID) < 0
                || TypesLengths.getTypeLength(TypesLengths.OBJECT_ID) > 8) {
            throw new TestErrorException("Improper ObjectID value length = "
                    + TypesLengths.getTypeLength(TypesLengths.OBJECT_ID) + "!");
        }
        reading_data_index = reading_data_index
                + TypesLengths.getTypeLength(TypesLengths.OBJECT_ID);
        return (int) readFromByteArray(data, reading_data_index
View Full Code Here

     * @return the next value of the data of the Packet as VM-sensitive value.
     */
    public TaggedObject getNextValueAsTaggedObject() {
        if (TypesLengths.getTypeLength(TypesLengths.OBJECT_ID) < 0
                || TypesLengths.getTypeLength(TypesLengths.OBJECT_ID) > 8) {
            throw new TestErrorException("Improper ObjectID value length = "
                    + TypesLengths.getTypeLength(TypesLengths.OBJECT_ID));
        }
        TaggedObject taggedObject = new TaggedObject();
        taggedObject.tag = this.getNextValueAsByte();
        taggedObject.objectID = this.getNextValueAsObjectID();
View Full Code Here

     *            MethodID value.
     */
    public void setNextValueAsMethodID(long methodID) {
        if (TypesLengths.getTypeLength(TypesLengths.METHOD_ID) < 0
                || TypesLengths.getTypeLength(TypesLengths.METHOD_ID) > 8) {
            throw new TestErrorException("Improper MethodID value length = "
                    + TypesLengths.getTypeLength(TypesLengths.METHOD_ID));
        }
        int new_data_size = data.length
                + TypesLengths.getTypeLength(TypesLengths.METHOD_ID);
        byte data_temp[] = data;
View Full Code Here

     * @return the next value of the data of the Packet as VM-sensitive value.
     */
    public long getNextValueAsMethodID() {
        if (TypesLengths.getTypeLength(TypesLengths.METHOD_ID) < 0
                || TypesLengths.getTypeLength(TypesLengths.METHOD_ID) > 8) {
            throw new TestErrorException("Improper MethodID value length = "
                    + TypesLengths.getTypeLength(TypesLengths.METHOD_ID));
        }
        reading_data_index = reading_data_index
                + TypesLengths.getTypeLength(TypesLengths.METHOD_ID);
        long result = readFromByteArray(data, reading_data_index
View Full Code Here

TOP

Related Classes of org.apache.harmony.jpda.tests.framework.TestErrorException

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.