Skip to content

Instantly share code, notes, and snippets.

@dain
Created December 11, 2012 18:25
Show Gist options
  • Save dain/4260847 to your computer and use it in GitHub Desktop.
Save dain/4260847 to your computer and use it in GitHub Desktop.
Java7 exception flow analysis
public class CallException
implements Callable<Boolean>
{
@Override
public Boolean call()
throws IOException
{
try {
if (Math.random() > 0) {
throw new IOException("random io failure");
}
}
catch (Throwable e) {
e.printStackTrace();
throw e;
}
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment