Skip to content

Commit

Permalink
Print errors to console even when caught
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnovov committed Oct 21, 2023
1 parent 106dc47 commit 141b338
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/formats/apple-notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export class AppleNotesImporter extends FormatImporter {
}

async import(ctx: ImportContext): Promise<void> {
console.time();

this.ctx = ctx;
this.protobufRoot = Root.fromJSON(descriptor);
this.rootFolder = await this.getOutputFolder() as TFolder;
Expand Down Expand Up @@ -142,6 +144,7 @@ export class AppleNotesImporter extends FormatImporter {
}
catch (e) {
this.ctx.reportFailed(f.ZTITLE2, e?.message);
console.error(e);
}
}

Expand All @@ -161,10 +164,12 @@ export class AppleNotesImporter extends FormatImporter {
}
catch (e) {
this.ctx.reportFailed(n.ZTITLE1, e?.message);
console.error(e);
}
}

this.database.close();
console.timeEnd();
}

async resolveAccount(id: number): Promise<void> {
Expand Down Expand Up @@ -357,7 +362,8 @@ export class AppleNotesImporter extends FormatImporter {
{ ctime: this.decodeTime(row.ZCREATIONDATE), mtime: this.decodeTime(row.ZMODIFICATIONDATE) }
);
}
catch {
catch (e) {
console.error(e);
return null;
}

Expand Down

0 comments on commit 141b338

Please sign in to comment.