You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2023/06/17 12:04:26 UTC
[causeway] 02/05: CAUSEWAY-3395: removes TODO pertaining to ExceptionRecognizer
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit ae6492c18304487134d544941d800f9965596856
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Jun 17 12:44:14 2023 +0100
CAUSEWAY-3395: removes TODO pertaining to ExceptionRecognizer
---
...ntentMappingService_020-examples-and-usage.adoc | 2 -
.../ExceptionRecognizer_010-implementation.adoc | 66 +++++++++-------------
2 files changed, 26 insertions(+), 42 deletions(-)
diff --git a/antora/components/refguide-index/modules/applib/pages/index/services/conmap/hooks/ContentMappingService_020-examples-and-usage.adoc b/antora/components/refguide-index/modules/applib/pages/index/services/conmap/hooks/ContentMappingService_020-examples-and-usage.adoc
index d05fc536f9..13ffc3ca60 100644
--- a/antora/components/refguide-index/modules/applib/pages/index/services/conmap/hooks/ContentMappingService_020-examples-and-usage.adoc
+++ b/antora/components/refguide-index/modules/applib/pages/index/services/conmap/hooks/ContentMappingService_020-examples-and-usage.adoc
@@ -4,8 +4,6 @@
== Usage
-// TODO: v2: this is an SPI, so maybe restfulobjects should define an "spi" module for this.
-
The `ContentMappingService` supports the (default implementation of the) internal xref:refguide:viewer:index/restfulobjects/rendering/service/conneg/ContentNegotiationService.adoc[ContentNegotiationService] SPI enabling the xref:vro:ROOT:about.adoc[RestfulObjects viewer] to represent domain objects in some other format as specified by the HTTP `Accept` header.
For its part, the (default implementation of the) `ContentNegotiationService` will check _all_ available implementations of `ContentMappingService` to convert the domain object to the requested media type, rather than merely the first implementation found; in other words it uses the link:https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern[chain-of-responsibility] pattern.
diff --git a/antora/components/refguide-index/modules/applib/pages/index/services/exceprecog/hooks/ExceptionRecognizer_010-implementation.adoc b/antora/components/refguide-index/modules/applib/pages/index/services/exceprecog/hooks/ExceptionRecognizer_010-implementation.adoc
index 9055ced361..8df61771c4 100644
--- a/antora/components/refguide-index/modules/applib/pages/index/services/exceprecog/hooks/ExceptionRecognizer_010-implementation.adoc
+++ b/antora/components/refguide-index/modules/applib/pages/index/services/exceprecog/hooks/ExceptionRecognizer_010-implementation.adoc
@@ -14,44 +14,30 @@ The framework provides a number of default implementations for JPA and JDO, to r
* other data access problem.
-// TODO: v2 - flesh this out once CAUSEWAY-2502 is complete.
-
-//=== Configuration Properties
-//
-//The following configuration properties are relevant:
-//
-//[cols="2a,1,3a", options="header"]
-//|===
-//|Property
-//|Value +
-//(default value)
-//|Description
-//
-//| `causeway.services.` +
-//`exceprecog.` +
-//`logRecognized` +
-//`Exceptions` +
-//|`true`,`false` +
-//(`false`)
-//|whether recognized exceptions should also be logged. +
-//
-//Generally a recognized exception is one that is expected (for example a uniqueness constraint violated in the database) and which does not represent an error condition.
-//This property logs the exception anyway, useful for debugging.
-//
-//This is recognised by all implementations that subclass `ExceptionRecognizerAbstract`.
-//
-//| `causeway.services.` +
-//`ExceptionRecognizer` +
-//`CompositeFor` +
-//`JdoObjectStore.` +
-//`disable` +
-//|`true`,`false` +
-//(`false`)
-//|whether to disable the default recognizers registered by `ExceptionRecognizerCompositeForJdoObjectStore`. +
-//
-//This implementation provides a default set of recognizers to convert RDBMS constraints into user-friendly messages.
-//In the (probably remote) chance that this functionality isn't required, they can be disabled through this flag.
-//
-//
-//|===
+=== Configuration Properties
+
+The following configuration property is relevant:
+
+[cols="2a,1,3a", options="header"]
+|===
+|Property
+|Value +
+(default value)
+|Description
+
+| `causeway.core.runtime-services.` +
+`exception-recognizer.dae.disable`
+|`true`,`false` +
+(`false`)
+|whether any `DataAccessException` exceptions should be recognized.+
+
+If Spring encounters a data access problem (either JPA or JDO) then it will throw a subclass of `DataAccessException`.
+
+This recogniser catches this exception class and throws a suitable recognition based on the subtype.
+
+By default, this is enabled.
+Disable it only if you need to fine-tune the built-in behaviour.
+
+
+|===