94feae71f2
Settings read/write errors were silently ignored. Report them via a SettingsException so that the caller can handle them. This allows to log a proper error message, and will also allow to fallback to a different settings method in case of failure. PR #2802 <https://github.com/Genymobile/scrcpy/pull/2802>
12 lines
480 B
Java
12 lines
480 B
Java
package com.genymobile.scrcpy;
|
|
|
|
public class SettingsException extends Exception {
|
|
private static String createMessage(String method, String table, String key, String value) {
|
|
return "Could not access settings: " + method + " " + table + " " + key + (value != null ? " " + value : "");
|
|
}
|
|
|
|
public SettingsException(String method, String table, String key, String value, Throwable cause) {
|
|
super(createMessage(method, table, key, value), cause);
|
|
}
|
|
}
|