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();
}
Aggregations