mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-08 11:50:10 +01:00
Ignored all UnsupportedOperationExceptions from Extensions
Affects issues: - Fixed #1667
This commit is contained in:
parent
d5a6ccc7a3
commit
fd729360c7
@ -47,7 +47,8 @@ public class MethodWrapper<T> {
|
||||
try {
|
||||
return returnType.cast(with.usingOn(extension, method));
|
||||
} catch (InvocationTargetException notReadyToBeCalled) {
|
||||
if (notReadyToBeCalled.getCause() instanceof NotReadyException) {
|
||||
if (notReadyToBeCalled.getCause() instanceof NotReadyException
|
||||
|| notReadyToBeCalled.getCause() instanceof UnsupportedOperationException) {
|
||||
return null; // Data or API not available to make the call.
|
||||
} else {
|
||||
throw new IllegalArgumentException(method.getDeclaringClass() + " method " + method.getName() + " could not be called: " + notReadyToBeCalled.getMessage(), notReadyToBeCalled);
|
||||
|
@ -140,7 +140,7 @@ public class ExtensionRegister {
|
||||
try {
|
||||
// Creates the extension with factory and registers it
|
||||
createExtension.apply(factory).ifPresent(this::register);
|
||||
} catch (NotReadyException ignore) {
|
||||
} catch (NotReadyException | UnsupportedOperationException ignore) {
|
||||
// This exception signals that the extension can not be registered right now (Intended fail).
|
||||
} catch (Exception | NoClassDefFoundError | IncompatibleClassChangeError e) {
|
||||
// Places all exceptions to one exception with plugin information so that they can be reported.
|
||||
@ -155,7 +155,7 @@ public class ExtensionRegister {
|
||||
try {
|
||||
// Creates the extension with factory and registers it
|
||||
createExtension.apply(factory).forEach(this::register);
|
||||
} catch (NotReadyException ignore) {
|
||||
} catch (NotReadyException | UnsupportedOperationException ignore) {
|
||||
// This exception signals that the extension can not be registered right now (Intended fail).
|
||||
} catch (Exception | NoClassDefFoundError | IncompatibleClassChangeError e) {
|
||||
// Places all exceptions to one exception with plugin information so that they can be reported.
|
||||
@ -173,7 +173,7 @@ public class ExtensionRegister {
|
||||
createExtension.apply(factory)
|
||||
.flatMap(this::register)
|
||||
.ifPresent(caller -> registerListener.accept(factory, caller));
|
||||
} catch (NotReadyException ignore) {
|
||||
} catch (NotReadyException | UnsupportedOperationException ignore) {
|
||||
// This exception signals that the extension can not be registered right now (Intended fail).
|
||||
} catch (Exception | NoClassDefFoundError | IncompatibleClassChangeError e) {
|
||||
// Places all exceptions to one exception with plugin information so that they can be reported.
|
||||
|
Loading…
Reference in New Issue
Block a user