From 560ded50127b12bd8168f8ae2bada47253f15bc8 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 8 Feb 2022 06:02:27 +0100 Subject: [website] slight feature documentation updates (Just bringing them in line with reality) --- website/templates/features/experimental/StandardException.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'website/templates/features/experimental/StandardException.html') diff --git a/website/templates/features/experimental/StandardException.html b/website/templates/features/experimental/StandardException.html index 1484154d..c7fc40fe 100644 --- a/website/templates/features/experimental/StandardException.html +++ b/website/templates/features/experimental/StandardException.html @@ -48,6 +48,8 @@ There is a very slight functional difference: Normally, invoking new SomeException(message, null) will initialize the cause to be no cause, and this cannot be later changed by invoking initCause. However, lombok's standard exceptions do let you overwrite an explicit no-cause with initCause later. +

+ A second slight functional difference: Normally, invoking new SomeException(cause), if implemented as super(cause);, will set the message to be equal to the message of the cause. However, lombok does not do this - it leaves the exception as having no message at all. We think inheriting the message is fundamentally wrong - messages are not guaranteed to be sensible in the absence of the context of the exception-type. The cause ought to be listed anywhere where it is relevant; if you are using messages as direct user feedback (which is rare, in the java community), @StandardException can't really help you anyway; the infrastructure of e.g. getLocalizedMessage() is too complicated.

-- cgit