Heads up: Source incompatible change in Truffle PolyglotEngine API

Jaroslav Tulach jaroslav.tulach at oracle.com
Wed Jul 13 17:23:55 UTC 2016


Dear Truffle users,
I am preparing long awaited removal of few "throws IOException" statements 
from PolyglotEngine and related classes. See

https://github.com/jtulach/truffle/commit/cd6ebeca83404f05e6302c6f7e8b5cde7a32e441

Alas, the removal isn't source compatible. It may happen you will need to 
remove statements like

try {
  /// call to PolyglotEngine
} catch (IOException ex) {
  ...
}

or 

void x() throws IOException { 
  // call to PolyglotEngine
}

because the javac may complain that the code in question isn't allowed to 
throw such exception and that there is no point in catching it. Rewrite such 
code for example to:

try {
  // call to PolyglotEngine
} catch (Exception ex) {
  ...
}

or remove the "throws IOException" altogether. I'll go through the code I know 
and try to prepare patches, so it compiles.

I am sorry for problems caused by my premature use of IOException.
-jt

PS: In spite of this action I swear I love checked exceptions!




More information about the graal-dev mailing list