diff --git a/ph-commons/src/main/java/com/helger/commons/error/IError.java b/ph-commons/src/main/java/com/helger/commons/error/IError.java index 3f3988aa6..e5758448d 100644 --- a/ph-commons/src/main/java/com/helger/commons/error/IError.java +++ b/ph-commons/src/main/java/com/helger/commons/error/IError.java @@ -197,6 +197,8 @@ default Throwable getLinkedExceptionCause () * @param aContentLocale * Locale to resolve the error text * @return The default string representation + * @see ErrorTextProvider#DEFAULT + * @see #getAsStringLocaleIndepdent() */ @Nonnull @Nonempty @@ -204,4 +206,22 @@ default String getAsString (@Nonnull final Locale aContentLocale) { return ErrorTextProvider.DEFAULT.getErrorText (this, aContentLocale); } + + /** + * Get the error as a string representation, including error ID, error + * location, error text and the linked exception. + * + * @param aContentLocale + * Locale to resolve the error text + * @return The default string representation + * @see ErrorTextProvider#DEFAULT + * @see #getAsString(Locale) + * @since 11.1.4 + */ + @Nonnull + @Nonempty + default String getAsStringLocaleIndepdent () + { + return getAsString (Locale.ROOT); + } }