mirror of https://github.com/VERT-sh/VERT.git
feat: more detailed error toasts
This commit is contained in:
parent
73cf06a855
commit
c9518d2967
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue