flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sachingoel0101 <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2797][cli] Add support for running jobs...
Date Tue, 27 Oct 2015 09:31:22 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message