You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2020/06/02 14:48:23 UTC
[jackrabbit-filevault] branch trunk updated: JCRVLT-440 treat
Throwables in hooks equally to PackageExceptions
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
The following commit(s) were added to refs/heads/trunk by this push:
new f1c5c8d JCRVLT-440 treat Throwables in hooks equally to PackageExceptions
f1c5c8d is described below
commit f1c5c8dfef550330049a48e0cb865c041bdff38c
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Jun 2 16:47:56 2020 +0200
JCRVLT-440 treat Throwables in hooks equally to PackageExceptions
---
.../jackrabbit/vault/packaging/impl/InstallHookProcessorImpl.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/InstallHookProcessorImpl.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/InstallHookProcessorImpl.java
index b638be8..d4ce02c 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/InstallHookProcessorImpl.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/InstallHookProcessorImpl.java
@@ -141,15 +141,13 @@ public class InstallHookProcessorImpl implements InstallHookProcessor {
for (Hook hook : hooks.values()) {
try {
hook.getHook().execute(context);
- } catch (PackageException e) {
+ } catch (Throwable e) {
// abort processing only for prepare and installed phase
if (context.getPhase() == InstallContext.Phase.PREPARE || context.getPhase() == InstallContext.Phase.INSTALLED) {
- log.warn("Hook " + hook.name +" threw package exception. {} aborted.", context.getPhase(), e);
+ log.warn("Hook " + hook.name +" threw exception. {} aborted.", context.getPhase(), e);
return false;
}
- log.warn("Hook " + hook.name +" threw package exception. Ignored", e);
- } catch (Throwable e) {
- log.warn("Hook " + hook.name +" threw runtime exception.", e);
+ log.warn("Hook " + hook.name +" threw exception. Ignored", e);
}
// if in end phase, shutdown hooks
if (context.getPhase() == InstallContext.Phase.END) {