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

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


     *            bytes array to enwrap into packet
     * @return new created ReplyPacket or CommandPacket
     */
    public static Packet interpretPacket(byte[] p) {
        if (p.length < HEADER_SIZE)
            throw new TestErrorException("Wrong packet");
        if (Packet.isReply(p))
            return new ReplyPacket(p);
        return new EventPacket(p);
    }
View Full Code Here


        }
        case CHAR_ID: {
            return charLength;
        }
        default:
            throw new TestErrorException("Unexpected type ID: " + typeID);
        }
    }
View Full Code Here

        case CHAR_ID: {
            classObjectLength = charLength;
            return;
        }
        default:
            throw new TestErrorException("Unexpected type ID: " + typeID);
        }
    }
View Full Code Here

        case JDWPConstants.Tag.THREAD_GROUP_TAG:
        case JDWPConstants.Tag.THREAD_TAG:
            return getLongValue() == value0.getLongValue();
        }

        throw new TestErrorException("Illegal tag value");
    }
View Full Code Here

            return "ThreadGroupID: " + getLongValue();
        case JDWPConstants.Tag.THREAD_TAG:
            return "ThreadID: " + getLongValue();
        }

        throw new TestErrorException("Illegal tag value: " + tag);
    }
View Full Code Here

            synchronized (waitForStart) {
                thrd.start();
                try {
                    waitForStart.wait();
                } catch (InterruptedException e) {
                    throw new TestErrorException(e);
                }
            }
            logWriter.println("thread started");

            synchronized (waitForStart) {
View Full Code Here

        if (debuggeeWrapper != null) {
            debuggeeWrapper.disposeConnection();
            try {
                debuggeeWrapper.vmMirror.closeConnection();
            } catch (Exception e) {
                throw new TestErrorException(e);
            }
            logWriter.println("Closed transport connection");
        }
    }
View Full Code Here

     * Get response from user and check if it is as expected.
     */
    private void checkUserResponse(String expected) throws IOException {
        String response = reader.readLine();
        if (!expected.equals(response)) {
            throw new TestErrorException("Unexpected user response: "
                    + response + " (expected: " + expected + ")");
        }
    }
View Full Code Here

        if (isListenConnection) {
            logWriter.println("Start listening on: " + address);
            try {
                address = transport.startListening(address);
            } catch (IOException e) {
                throw new TestErrorException(e);
            }
            logWriter.println("Listening on: " + address);
        } else {
            logWriter.println("Attach to: " + address);
        }

        String cmdLine = settings.getDebuggeeJavaPath() + " -cp \""
                + settings.getDebuggeeClassPath() + "\" -agentlib:"
                + settings.getDebuggeeAgentName() + "="
                + settings.getDebuggeeAgentOptions(address, isListenConnection)
                + " " + settings.getDebuggeeVMExtraOptions() + " "
                + (savedVMOptions != null ? savedVMOptions : "") + " "
                + settings.getDebuggeeClassName();

        logWriter.println("Launch: " + cmdLine);

        try {
            launchProcessAndRedirectors(cmdLine);
            logWriter.println("Launched debuggee process");
            openConnection();
            logWriter.println("Established transport connection");
        } catch (Exception e) {
            throw new TestErrorException(e);
        }
    }
View Full Code Here

                transport.attach(address, settings.getTimeout(), settings.getTimeout());
            }
            setConnection(transport);
        } catch (IOException e) {
            logWriter.printError(e);
            throw new TestErrorException(e);
        }
    }
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.