You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, im updating my project and i came across this problem. I have some uses for Geocoder\Exception\NoResult, but those no longer exist.
Are there any equivalents? Or should i use the generic exception for this cases?
The thing is we have different exceptions thrown if some conditions are met, for example in this case:
if(empty($content))
{
throw new NoResult(sprintf('Could not execute query "%s".', $query));
}
I was just thinking of using the normal exception. How would you use the addressCollection in this case?
Activity
jbelien commentedon Apr 26, 2023
Hello @VikitorGalevez,
I must admit I don't remember that
NoResult
exception ; it was probably from a version before I joined the project.But I think you could migrate that exception catch to the
isEmpty()
function inAddressCollection
class (seeAddressCollection.php
).VikitorGalevez commentedon Apr 26, 2023
The thing is we have different exceptions thrown if some conditions are met, for example in this case:
if(empty($content))
{
throw new NoResult(sprintf('Could not execute query "%s".', $query));
}
I was just thinking of using the normal exception. How would you use the addressCollection in this case?