I have such codes in android studio:
@Override
public void onLocationChanged(AMapLocation amapLocation) {
if (amapLocation != null && amapLocation.getAMapException() != null
&& amapLocation.getAMapException().getErrorCode() == 0) {
// get location information
mLocation = amapLocation;
MyApp.getInstance().getPrefs().Latitude()
.put("" + amapLocation.getLatitude());
MyApp.getInstance().getPrefs().Longitude()
.put("" + amapLocation.getLongitude());
}
}
The method getAMapException returns an instance of AMapLocException which extends from Exception.
Now android studio shows some tips and I don't know how to handle them.
Reports calls to specific methods where the result of the call is ignored and which return an object of type (or subtype of) Throwable. Usually these types of methods are meant as factory methods for exceptions and the result should be thrown.
and I also found the ThrowableResultOfMethodCallIgnored.java file source by google, but i still don't know how to handle it.