[epsonprojector] Log invalid number when expecting numeric response from projector ()

* Log invalid number when expecting numeric response from projector

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
This commit is contained in:
mlobstein 2022-10-15 02:35:14 -05:00 committed by GitHub
parent f5101b1764
commit 61b9e74c95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -178,7 +178,12 @@ public class EpsonProjectorDevice {
str = subStr[0];
}
return Integer.parseInt(str, radix);
try {
return Integer.parseInt(str, radix);
} catch (NumberFormatException nfe) {
throw new EpsonProjectorCommandException(
"Unable to parse response '" + str + "' as Integer for command: " + query);
}
}
protected int queryInt(String query, int timeout) throws EpsonProjectorCommandException, EpsonProjectorException {