Translated error messages

This commit is contained in:
Przemek Wiech
2020-09-12 20:04:42 +02:00
parent a886230305
commit 13b147f082
9 changed files with 68 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
import {GedcomEntry, parse as parseGedcom} from 'parse-gedcom';
import {TopolaError} from './error';
import {
JsonFam,
JsonGedcomData,
@@ -245,7 +246,7 @@ export function convertGedcom(
!json.fams ||
!json.fams.length
) {
throw new Error('Failed to read GEDCOM file');
throw new TopolaError('GEDCOM_READ_FAILED', 'Failed to read GEDCOM file');
}
return {