mirror of https://github.com/Genymobile/scrcpy
Report settings errors via Exceptions
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>settings
parent
67170437f1
commit
94feae71f2
@ -0,0 +1,11 @@
|
||||
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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue