log record file on parsing error
This commit is contained in:
parent
3a9856dfce
commit
e03711c41c
|
@ -818,6 +818,7 @@ class ExportService {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getExportRecord(folder?: string): Promise<ExportRecord> {
|
async getExportRecord(folder?: string): Promise<ExportRecord> {
|
||||||
|
let recordFile: string;
|
||||||
try {
|
try {
|
||||||
if (!folder) {
|
if (!folder) {
|
||||||
folder = getData(LS_KEYS.EXPORT)?.folder;
|
folder = getData(LS_KEYS.EXPORT)?.folder;
|
||||||
|
@ -829,12 +830,12 @@ class ExportService {
|
||||||
if (!exportFolderExists) {
|
if (!exportFolderExists) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const recordFile = await this.electronAPIs.getExportRecord(
|
recordFile = await this.electronAPIs.getExportRecord(
|
||||||
`${folder}/${EXPORT_RECORD_FILE_NAME}`
|
`${folder}/${EXPORT_RECORD_FILE_NAME}`
|
||||||
);
|
);
|
||||||
return JSON.parse(recordFile);
|
return JSON.parse(recordFile);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e, 'export Record JSON parsing failed ');
|
logError(e, 'export Record JSON parsing failed ', { recordFile });
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue