moko-permissions
moko-permissions copied to clipboard
DeniedAlwaysException should not extend DeniedException
When DeniedAlwaysException extends DeniedException, the exceptions must be caught in the correct order, with DeniedAlwaysException always first, because DeniedAlwaysException is also a DeniedException and if it's first in the catch stack, the DeniedAlwaysException block will never be called.
The solution is to have them each extend Exception instead.