fail cleanly when a printer does not answer GS I 1
Claude-Session: https://claude.ai/code/session_01E6N3P4nSZLtp4BC2LXVref
This commit is contained in:
@@ -39,6 +39,14 @@ public class EpsonPrintService: IPrintService
|
||||
|
||||
_logger.LogInformation("Printer ID({ip}): {PrinterId}", printerIp, printerId);
|
||||
|
||||
if (printerId is null)
|
||||
{
|
||||
_logger.LogWarning(
|
||||
"Printer {PrinterIp} did not answer GS I 1, so its model is unknown; " +
|
||||
"cannot choose a printer adapter", printerIp);
|
||||
return PrintResult.Fail(PrintErrorType.Other);
|
||||
}
|
||||
|
||||
var status = await epsonPrinter.GetPrinterStatusAsync();
|
||||
if (!status.IsOnline)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user