Class TranslationFallbackEvent.PrecedingFailure
java.lang.Object
com.lokalized.TranslationFallbackEvent.PrecedingFailure
- Enclosing class:
TranslationFallbackEvent
Failure of one locale candidate preceding a successful fallback translation.
The runtime cause is exposed by reference and is outside this class's thread-safety guarantee.
- Since:
- 3.1.1
- Author:
- Mark Allen
-
Constructor Summary
ConstructorsConstructorDescriptionPrecedingFailure(@NonNull Locale locale, @NonNull TranslationFailureReason reason, @Nullable Throwable cause) Constructs a preceding candidate failure. -
Method Summary
-
Constructor Details
-
PrecedingFailure
public PrecedingFailure(@NonNull Locale locale, @NonNull TranslationFailureReason reason, @Nullable Throwable cause) Constructs a preceding candidate failure.- Parameters:
locale- attempted locale, not nullreason- reason the candidate failed, not nullcause- runtime cause for a resolution failure, otherwise null- Throws:
IllegalArgumentException- if the locale is malformed, a resolution failure has no cause, or another failure reason has a cause
-
-
Method Details
-
getLocale
-
getReason
Gets the reason this candidate failed.- Returns:
- failure reason, not null
-
getCause
-
toString
-