Github user davidyan74 commented on a diff in the pull request:
https://github.com/apache/incubator-apex-core/pull/321#discussion_r61951218
--- Diff: engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java ---
@@ -3366,6 +3370,28 @@ public void execute(String[] args, ConsoleReader
reader) throws Exception
}
+ private class GetContainerStackTrace implements Command
+ {
+ @Override
+ public void execute(String[] args, ConsoleReader reader) throws
Exception
+ {
+ String containerLongId = getContainerLongId(args[1]);
+ if (containerLongId == null) {
+ throw new CliException("Container " + args[1] + " not found");
+ }
+
+ JSONObject response;
+ try {
+ response =
getResource(StramWebServices.PATH_PHYSICAL_PLAN_CONTAINERS + "/" + args[1] +
"/" + StramWebServices.PATH_STACKTRACE, currentApp);
+ } catch (Exception ex) {
+ throw new CliException(ex.toString());
--- End diff --
instead of new CliException(ex.toString), can you do:
```java
throw new CliException("<Some meaningful error message for the user>", ex);
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---