Skip to content

Conversation

@nrgraham23
Copy link
Contributor

This commit improves and corrects error handling. In
cases where existing objects are altered after a call
to ompi_java_exceptionCheck, the results of the exception
check method are checked. In the case of an exception,
memory is cleaned up and the code returns to Java without
altering existing objects.

Signed-off-by: Nathaniel Graham [email protected]

Fixes #1698

@hppritcha please review this when you get a chance.

@lanl-ompi
Copy link
Contributor

Test FAILed.

@nrgraham23 nrgraham23 added this to the v2.1.0 milestone Sep 7, 2016
@hppritcha
Copy link
Member

looks good but please update the LANL copyright lines on the changed files.

This commit improves and corrects error handling.  In
cases where existing objects are altered after a call
to ompi_java_exceptionCheck, the results of the exception
check method are checked.  In the case of an exception,
memory is cleaned up and the code returns to Java without
altering existing objects.

Signed-off-by: Nathaniel Graham <[email protected]>
@nrgraham23 nrgraham23 merged commit 745872e into open-mpi:master Sep 8, 2016
@siegmargross
Copy link

Thank you very much for the fix. With the following addition to your version of the exception program, I get what I want. I found the solution for the root cause on stackoverflow.

catch (IndexOutOfBoundsException e) {
  System.err.println("Handle index out of bounds here");
  /* Try to find the root cause for the exception                   */
  Throwable cause = null; 
  Throwable result = e;
  while (null != (cause = result.getCause()) && (result != cause))  {
    result = cause;
  }
  System.err.printf ("  Process %2d: Error message: %s\n",  mytid, result);
}

@nrgraham23 nrgraham23 deleted the check_exceptionCheck branch November 16, 2016 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants