Github user sachingoel0101 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1214#discussion_r43098720
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java ---
    @@ -909,7 +919,21 @@ private int handleError(Throwable t) {
                }
                LOG.error("Error while running the command.", t);
     
    -           t.printStackTrace();
    +           // check if the error was due to an invalid program in detached 
mode.
    +           if (t instanceof ProgramInvocationException && t.getCause() 
instanceof DetachedProgramException) {
    +                   System.err.println(t.getCause().getMessage());
    +                   // now trace to the user's main method. We don't wanna 
show unnecessary information
    +                   // in this particular case.
    --- End diff --
    
    True. I didn't wanna change the existing stack traces.
    This will require maintaining a global variable for whether the program was 
run in interactive mode. The `DetachedProgramException` is a special case where 
we don't wanna clutter the stack trace with flink's trace, instead just show 
the user program's stack trace.
    In other cases, this might not be the case.


---
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.
---

Reply via email to