mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-10 19:06:50 +01:00
chore: Remove obsolete error toast custom message.
All patches that can encounter network errors now manage their own error toasts.
This commit is contained in:
parent
f9fa526b04
commit
c7d9ccd13c
@ -110,14 +110,7 @@ public class Logger {
|
|||||||
* Logs exceptions under the outer class name of the code calling this method.
|
* Logs exceptions under the outer class name of the code calling this method.
|
||||||
*/
|
*/
|
||||||
public static void printException(@NonNull LogMessage message) {
|
public static void printException(@NonNull LogMessage message) {
|
||||||
printException(message, null, null);
|
printException(message, null);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logs exceptions under the outer class name of the code calling this method.
|
|
||||||
*/
|
|
||||||
public static void printException(@NonNull LogMessage message, @Nullable Throwable ex) {
|
|
||||||
printException(message, ex, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,10 +121,8 @@ public class Logger {
|
|||||||
*
|
*
|
||||||
* @param message log message
|
* @param message log message
|
||||||
* @param ex exception (optional)
|
* @param ex exception (optional)
|
||||||
* @param userToastMessage user specific toast message to show instead of the log message (optional)
|
|
||||||
*/
|
*/
|
||||||
public static void printException(@NonNull LogMessage message, @Nullable Throwable ex,
|
public static void printException(@NonNull LogMessage message, @Nullable Throwable ex) {
|
||||||
@Nullable String userToastMessage) {
|
|
||||||
String messageString = message.buildMessageString();
|
String messageString = message.buildMessageString();
|
||||||
String outerClassSimpleName = message.findOuterClassSimpleName();
|
String outerClassSimpleName = message.findOuterClassSimpleName();
|
||||||
String logMessage = REVANCED_LOG_PREFIX + outerClassSimpleName;
|
String logMessage = REVANCED_LOG_PREFIX + outerClassSimpleName;
|
||||||
@ -141,10 +132,7 @@ public class Logger {
|
|||||||
Log.e(logMessage, messageString, ex);
|
Log.e(logMessage, messageString, ex);
|
||||||
}
|
}
|
||||||
if (DEBUG_TOAST_ON_ERROR.get()) {
|
if (DEBUG_TOAST_ON_ERROR.get()) {
|
||||||
String toastMessageToDisplay = (userToastMessage != null)
|
Utils.showToastLong(outerClassSimpleName + ": " + messageString);
|
||||||
? userToastMessage
|
|
||||||
: outerClassSimpleName + ": " + messageString;
|
|
||||||
Utils.showToastLong(toastMessageToDisplay);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ public class ReturnYouTubeDislikeApi {
|
|||||||
handleConnectionError((str("revanced_ryd_failure_generic", ex.getMessage())), ex, true);
|
handleConnectionError((str("revanced_ryd_failure_generic", ex.getMessage())), ex, true);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// should never happen
|
// should never happen
|
||||||
Logger.printException(() -> "Failed to fetch votes", ex, str("revanced_ryd_failure_generic", ex.getMessage()));
|
Logger.printException(() -> "fetchVotes failure", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateRateLimitAndStats(timeNetworkCallStarted, true, false);
|
updateRateLimitAndStats(timeNetworkCallStarted, true, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user