Search in sources :

Example 1 with NotSupportedException

use of flash.tools.debugger.NotSupportedException in project intellij-plugins by JetBrains.

the class DebugCLI method doCatch.

private void doCatch() throws NotConnectedException, NotSuspendedException, NoResponseException {
    /* wait a bit if we are not halted */
    waitTilHalted();
    String typeToCatch = null;
    /* currentXXX may NOT be invalid! */
    if (!hasMoreTokens()) {
        err("Catch requires an exception name.");
        return;
    }
    typeToCatch = nextToken();
    if (typeToCatch == null || typeToCatch.length() == 0) {
        err("Illegal argument");
        return;
    }
    Value type = null;
    if (//$NON-NLS-1$
    typeToCatch.equals("*")) {
        typeToCatch = null;
    } else {
        type = getSession().getGlobal(typeToCatch);
        if (type == null) {
            err("Type not found.");
            return;
        }
        String typeName = type.getTypeName();
        int at = typeName.indexOf('@');
        if (at != -1)
            typeName = typeName.substring(0, at);
        if (!typeName.endsWith("$")) {
            err("Not a type: " + type);
            return;
        }
    }
    CatchAction c;
    try {
        c = addCatch(typeToCatch);
    } catch (NotSupportedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        return;
    }
    Map<String, Object> args = new HashMap<String, Object>();
    //$NON-NLS-1$
    args.put("id", c.getId());
    c.getId();
}
Also used : HashMap(java.util.HashMap) Value(flash.tools.debugger.Value) NotSupportedException(flash.tools.debugger.NotSupportedException)

Aggregations

NotSupportedException (flash.tools.debugger.NotSupportedException)1 Value (flash.tools.debugger.Value)1 HashMap (java.util.HashMap)1