Examples of RampException


Examples of edu.brown.cs.rampcommon.RampException

                //Get the class+method name and the descriptor
                String[] arrNameDesc = callee.split("\\(");
                if ((arrNameDesc.length < 2) || (arrNameDesc.length > 3))
                {
                    throw new RampException("Invalid full name of the method " + callee);
                }
                String strCalleeClassMethodName = arrNameDesc[0];
                String strCalleeDescriptor = "(" + arrNameDesc[1];

                    int idStart = ++m_iProbeIDCounter;
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

                //Get the class+method name and the descriptor
                String[] arrNameDesc = callee.split("\\(");
                if ((arrNameDesc.length < 2) || (arrNameDesc.length > 3))
                {
                    throw new RampException("Invalid full name of the method " + callee);
                }
                String strCalleeClassMethodName = arrNameDesc[0];
                String strCalleeDescriptor = "(" + arrNameDesc[1];

                //Get information about the call and about the patch
                MethodToTrack methodToTrack = MethodsToTrackSet.isMethodToBeTracked(strCalleeClassMethodName, strCalleeDescriptor);
                if (methodToTrack == null)
                {
                    throw new RampException("No information record for method " + strCalleeClassMethodName);
                }

                if (!methodToTrack.m_bPatchDirect)
                {   //This method has many arguments and call to it cannot be patched
                    //directly. First, create a wrapper for each call. Wrapper is a
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

                } else if (whatInvoked.equals("MONITOREXIT"))
                {
                    bEnter = false;
                } else
                {
                    throw new RampException(String.format("Sync region entry for method %s, line %d has incorrect class value", callerMethodName, callerLineNo));
                }

                PatchData sp;
                //dEpending on the context, generate sync_entering or _exiting
                //patch that will be called before the sync routine will be executed
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

            } else if (strProbe.equalsIgnoreCase("END"))
            {
                return false;
            } else
            {
                throw new RampException("Incorrect value of PROBE element " + strProbe
                        + ". Allowed values are START or END");
            }
        }
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

    static LibProbeDescriptor fromString(String strDescriptor) throws RampException
    {
        String[] arrItems = strDescriptor.split(",");
        if ((arrItems.length < 2) || (arrItems.length > 3))
        {
            throw new RampException("Incorrect format of library probe record: "+strDescriptor);
        }
        int iStartProbeID=Integer.parseInt(arrItems[0]);
        int iEndProbeID=Integer.parseInt(arrItems[1]);
        boolean bDisabled = false;
        if (arrItems.length == 3)
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

            int iLine = 1;

            String strText = reader.readLine();
            if (strText == null)
            {
                throw new RampException("Unable to read the total number of probes from file "+strProbesFilePath);
            }
            m_iTotalProbeCount = Integer.parseInt(strText);
           
            while  ((strText = reader.readLine()) != null)
            {
                iLine++;
                LibProbeDescriptor probeDesc = LibProbeDescriptor.fromString(strText);
                m_arrDescriptors.add(probeDesc);
            }

        }catch(Exception e)
        {
            throw new RampException("Exception while reading the library probe descriptor file "+strProbesFilePath, e);
        }
    }
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

    public void writeSet(String strFileName) throws RampException
    {
        if (m_iTotalProbeCount==0)
        {
            throw new RampException("The total number of probes haven't been set");
        }

        try
        {
            BufferedWriter writer = new BufferedWriter(new FileWriter(strFileName));
            writer.write(Integer.toString(m_iTotalProbeCount));
            writer.write("\n");
            for (LibProbeDescriptor desc:m_arrDescriptors)
            {
                writer.write(desc.toString());
                writer.write("\n");
            }
            writer.close();
        }catch(Exception e)
        {
            throw new RampException("Cannot write the set of library probe pairs ",e);
        }
    }
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

            Element intervalElem) throws RampException
    {
        m_elemStart = IvyXml.getChild(intervalElem, "START");
        if (m_elemStart == null)
        {
            throw new RampException("Can't initialize TimeIntervalDescriptor from XML: START element is missing");
        }

        m_elemEnd = IvyXml.getChild(intervalElem, "END");
        if (m_elemEnd == null)
        {
            throw new RampException("Can't initialize TimeIntervalDescriptor from XML: END element is missing");
        }

        m_start = new TimeIntervalRecord(m_elemStart);
        m_end = new TimeIntervalRecord(m_elemEnd);
       
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

                m_iStartProbeID = IvyXml.getAttrInt(elem, "STARTID");
                m_iEndProbeID = IvyXml.getAttrInt(elem, "ENDID");
                m_strName = m_strThreadGroupName + "_" + m_iStartProbeID + "_" + m_iEndProbeID;
            } else
            {
                throw new RampException(elem.getTagName() + " element has incomplete information ");
            }
        }
View Full Code Here

Examples of edu.brown.cs.rampcommon.RampException

            if (objLast.getClass().equals(objValue.getClass()))
            {
                arrParam.add(objValue);
            }else
            {
                throw new RampException(String.format("Cannot add instance of %s into the collection of instances of %s", objValue.getClass(), objLast.getClass()));
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.