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); res = await this.converter.convert(this, this.to);
this.result = res; this.result = res;
} catch (err) { } catch (err) {
error(["files"], err); const castedErr = err as Error;
addToast("error", `Error converting file: ${this.file.name}`); error(["files"], castedErr.message);
addToast(
"error",
`Error converting file ${this.file.name}: ${castedErr.message}`,
);
this.result = null; this.result = null;
} }
this.processing = false; this.processing = false;