v5.1.0
As of v5.1.0 concrete exceptions are available in \Stichoza\GoogleTranslate\Exceptions
namespace:
LargeTextException
If the requested text is too large to translate.RateLimitException
If Google has blocked you for excessive amount requests.TranslationRequestException
If any other HTTP related error occurs during translation.TranslationDecodingException
If the response JSON cannot be decoded.
All concrete exceptions are backwards compatible, so if you were using older versions, you won't have to update your code.
TranslationDecodingException
extends UnexpectedValueException
, while LargeTextException
, RateLimitException
and TranslationRequestException
extend ErrorException
that was used in older versions (<5.1.0
) of this package.
Finally a good answer to #70