File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/kotlin/de/gmuth/ipp/client Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -612,11 +612,15 @@ class IppPrinter(
612612 .printerGroup.getValue(" printer-strings-uri" )
613613 }
614614
615- fun savePrinterStrings (language : String = "en") =
615+ fun savePrinterStrings (language : String = "en") = try {
616616 getPrinterStringsUri(language).save(extension = " plist" ) // Apple property list
617+ } catch (fileNotFoundException: FileNotFoundException ) {
618+ logger.warning { " Printer strings file not found: ${fileNotFoundException.message} " }
619+ null
620+ }
617621
618622 fun saveAllPrinterStrings (): Collection <File >? = attributes[" printer-strings-languages-supported" ]
619- ?.values?.map { savePrinterStrings(it as String ) }
623+ ?.values?.mapNotNull { savePrinterStrings(it as String ) }
620624
621625 // --------------------------------------------------
622626 // Internal utilities implemented as Kotlin extension
You can’t perform that action at this time.
0 commit comments