Refactor error handling in various components to ignore modal display failures and improve code clarity
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 51s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 51s
This commit is contained in:
@@ -39,7 +39,9 @@ function setTextFieldIfEmpty(field, val) {
|
||||
const cur = field.getText()
|
||||
if (cur && String(cur).trim() !== '') return
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (_e) {
|
||||
// Feld nicht lesbar, ignorieren
|
||||
}
|
||||
if (val != null && String(val).trim() !== '') field.setText(val)
|
||||
}
|
||||
|
||||
@@ -58,9 +60,13 @@ function setCheckboxIfNeeded(field, name, data) {
|
||||
if (mapped === 'true' || mapped === 'ja' || mapped === 'checked') {
|
||||
try {
|
||||
if (!(typeof field.isChecked === 'function' && field.isChecked())) field.check && field.check()
|
||||
} catch (e) { field.check && field.check() }
|
||||
} catch (_e) {
|
||||
field.check && field.check()
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (_e) {
|
||||
// Feld nicht verarbeitbar, ignorieren
|
||||
}
|
||||
}
|
||||
|
||||
async function fillFormFields(pdfDoc, form, data) {
|
||||
@@ -81,7 +87,9 @@ async function fillFormFields(pdfDoc, form, data) {
|
||||
try {
|
||||
const helv2 = await pdfDoc.embedFont(StandardFonts.Helvetica)
|
||||
form.updateFieldAppearances(helv2)
|
||||
} catch (e) {}
|
||||
} catch (_e) {
|
||||
// Schriftart nicht einbettbar, ignorieren
|
||||
}
|
||||
}
|
||||
|
||||
function generateLaTeXContent(data) {
|
||||
|
||||
Reference in New Issue
Block a user