You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2020/08/26 11:39:15 UTC

[camel-quarkus] branch master updated: Documented application developer responsibility when using onException in native mode #1605

This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/master by this push:
     new c13e966  Documented application developer responsibility when using onException in native mode #1605
c13e966 is described below

commit c13e9664bcc7c15a3bb3de4be6f68c7020f0d987
Author: aldettinger <al...@gmail.com>
AuthorDate: Wed Aug 26 11:28:14 2020 +0200

    Documented application developer responsibility when using onException in native mode #1605
---
 docs/modules/ROOT/pages/user-guide/native-mode.adoc | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/docs/modules/ROOT/pages/user-guide/native-mode.adoc b/docs/modules/ROOT/pages/user-guide/native-mode.adoc
index 0913ead..af71298 100644
--- a/docs/modules/ROOT/pages/user-guide/native-mode.adoc
+++ b/docs/modules/ROOT/pages/user-guide/native-mode.adoc
@@ -41,6 +41,21 @@ In the example above, resources named _docs/included.adoc_ and _images/included.
 `include-patterns` and `exclude-patterns` are list of comma separated link:https://github.com/apache/camel/blob/master/core/camel-util/src/main/java/org/apache/camel/util/AntPathMatcher.java[Ant-path style patterns].
 At the end of the day, resources matching `include-patterns` are marked for inclusion at the exception of resources matching `exclude-patterns`.
 
+[[using-onexception-clause-in-native-mode]]
+== Using onException clause in native mode
+
+When using https://camel.apache.org/manual/latest/exception-clause.html[camel onException handling] in native mode, it is the application developer responsibility to register exception classes for reflection.
+
+For instance, having a camel context with onException handling as below:
+
+[source,java]
+----
+onException(MyException.class).handled(true);
+from("direct:route-that-could-produce-my-exception").throw(MyException.class);
+----
+
+The class `mypackage.MyException` should be registered for reflection, see more in xref:user-guide/native-mode.adoc#reflection[Registering classes for reflection].
+
 [[reflection]]
 == Registering classes for reflection