feat: more detailed error toasts

This commit is contained in:
not-nullptr 2025-02-26 15:46:56 +00:00
parent 73cf06a855
commit c9518d2967
1 changed files with 6 additions and 2 deletions

View File

@ -47,8 +47,12 @@ export class VertFile {
res = await this.converter.convert(this, this.to);
this.result = res;
} catch (err) {
error(["files"], err);
addToast("error", `Error converting file: ${this.file.name}`);
const castedErr = err as Error;
error(["files"], castedErr.message);
addToast(
"error",
`Error converting file ${this.file.name}: ${castedErr.message}`,
);
this.result = null;
}
this.processing = false;