java - Should "throws AuthFailureError" be included when overriding Request's getHeaders()? -
volley's documentation request's getheaders() method states:
returns list of http headers go along request. can throw authfailureerror authentication may required provide these values.
numerous examples, such this answer , this example (both of extend jsonobjectrequest) include throws authfailureerror
when overriding method, despite don't throw exception neither call super
inside method.
on other hand, some other examples ommit it. (which, think, perfectly fine).
as far notice, including throws authfailureerror
when not needed adds more complexity code try/catch
block or throws
declaration needed in methods call getheaders()
.
is there advantage of including exception in declaration or potential risk of omitting it?
Comments
Post a Comment