diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2022-02-08 06:02:27 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2022-02-08 06:02:27 +0100 |
commit | 560ded50127b12bd8168f8ae2bada47253f15bc8 (patch) | |
tree | 2f45f710c4debb8d09ead906acdaaed2f03c2b6f /website/templates/features/experimental/StandardException.html | |
parent | 261758b4448b3d48ff2f48926ffcb8ea66121603 (diff) | |
download | lombok-560ded50127b12bd8168f8ae2bada47253f15bc8.tar.gz lombok-560ded50127b12bd8168f8ae2bada47253f15bc8.tar.bz2 lombok-560ded50127b12bd8168f8ae2bada47253f15bc8.zip |
[website] slight feature documentation updates (Just bringing them in line with reality)
Diffstat (limited to 'website/templates/features/experimental/StandardException.html')
-rw-r--r-- | website/templates/features/experimental/StandardException.html | 2 |
1 files changed, 2 insertions, 0 deletions
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 <code>new SomeException(message, null)</code> will initialize the cause to be <em>no cause</em>, and this cannot be later changed by invoking <code>initCause</code>. However, lombok's standard exceptions <strong>do</strong> let you overwrite an explicit no-cause with <code>initCause</code> later. + </p><p> + A second slight functional difference: Normally, invoking <code>new SomeException(cause)</code>, if implemented as <code>super(cause);</code>, 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), <code>@StandardException</code> can't really help you anyway; the infrastructure of e.g. <code>getLocalizedMessage()</code> is too complicated. </p> </@f.smallPrint> </@f.scaffold> |