Open psionic12 opened 3 years ago
@passy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Does it make sense to add java.lang.Exception, for completeness, and have most of these extend that, rather than Throwable?
Does it make sense to move these to Exceptions.h?
ArrayIndexOutOfBounds exception should extend RuntimeException, rather than throwable.
While this pr are not intended to change fbjni too much, just expose the predefined exception for an easy use. What you mentioned sound reasonable but need a fully discussion with other fbjni members, I guess.
just expose the predefined exception for an easy use
The issue here is that there are some deficiencies in the existing implementations that didn't cause any problems with the specific ways they were being used, but that should be cleaned up before we make them available as general-purpose utilities for consumers.
need a fully discussion with other fbjni members
These suggestions were made internally by Marc Horowitz, and I agree with them. That's more than enough fbjni members to approve this change. :)
@psionic12 has updated the pull request. You must reimport the pull request before landing.
@dreiss Done.
Some Java codes take an exception as a parameter (e.g.
public void callFailed(Call call, IOException ioe)
in okhttp)Make JXXExceptions public to save time.