Recognition
Represents a user-friendly representation of an exception that has been recognised by an available implementation of an ExceptionRecognizer .
Returned by ExceptionRecognizer#recognize(Throwable) when the exception recognizer has recognised the exception
API
class Recognition {
Optional<Recognition> of(Category category, String reason) (1)
String toMessage(TranslationService translationService) (2)
String toMessageNoCategory(TranslationService translationService) (3)
}
1 | of(Category, String) |
2 | toMessage(TranslationService)
Translates the #getReason() reason and prepends with a translation of #getCategory() category , using the provided TranslationService .. |
3 | toMessageNoCategory(TranslationService)
Translates the #getReason() reason alone (ignoring the #getCategory() category , using the provided TranslationService .. |
Members
toMessage(TranslationService)
Translates the #getReason() reason and prepends with a translation of #getCategory() category , using the provided TranslationService ..
toMessageNoCategory(TranslationService)
Translates the #getReason() reason alone (ignoring the #getCategory() category , using the provided TranslationService ..