Skip to content

Commit

Permalink
fix: Use correct super class type
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This changes the super classes of some `PatchOptionException` classes
  • Loading branch information
oSumAtrIX committed Oct 4, 2023
1 parent cbfb9ba commit f590436
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions revanced-patcher/api/revanced-patcher.api
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,15 @@ public final class app/revanced/patcher/patch/options/PatchOptionException$Inval
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
}

public final class app/revanced/patcher/patch/options/PatchOptionException$PatchOptionNotFoundException : java/lang/Exception {
public final class app/revanced/patcher/patch/options/PatchOptionException$PatchOptionNotFoundException : app/revanced/patcher/patch/options/PatchOptionException {
public fun <init> (Ljava/lang/String;)V
}

public final class app/revanced/patcher/patch/options/PatchOptionException$ValueRequiredException : java/lang/Exception {
public final class app/revanced/patcher/patch/options/PatchOptionException$ValueRequiredException : app/revanced/patcher/patch/options/PatchOptionException {
public fun <init> (Lapp/revanced/patcher/patch/options/PatchOption;)V
}

public final class app/revanced/patcher/patch/options/PatchOptionException$ValueValidationException : java/lang/Exception {
public final class app/revanced/patcher/patch/options/PatchOptionException$ValueValidationException : app/revanced/patcher/patch/options/PatchOptionException {
public fun <init> (Ljava/lang/Object;Lapp/revanced/patcher/patch/options/PatchOption;)V
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ sealed class PatchOptionException(errorMessage: String) : Exception(errorMessage
* @param value The value that failed validation.
*/
class ValueValidationException(value: Any?, option: PatchOption<*>) :
Exception("The option value \"$value\" failed validation for ${option.key}")
PatchOptionException("The option value \"$value\" failed validation for ${option.key}")

/**
* An exception thrown when a value is required but null was passed.
*
* @param option The [PatchOption] that requires a value.
*/
class ValueRequiredException(option: PatchOption<*>) :
Exception("The option ${option.key} requires a value, but null was passed")
PatchOptionException("The option ${option.key} requires a value, but null was passed")

/**
* An exception thrown when a [PatchOption] is not found.
*
* @param key The key of the [PatchOption].
*/
class PatchOptionNotFoundException(key: String)
: Exception("No option with key $key")
: PatchOptionException("No option with key $key")
}

0 comments on commit f590436

Please sign in to comment.