🐛 Added error handler

This commit is contained in:
Liyas Thomas
2019-12-22 15:49:26 +05:30
parent 5589c61423
commit 10f6bb9cc6

View File

@@ -131,7 +131,16 @@ export default {
},
getDoc() {
this.items = JSON.parse(this.collectionJSON);
try {
this.items = JSON.parse(this.collectionJSON);
this.$toast.info("Documentation generated", {
icon: "book"
});
} catch (e) {
this.$toast.error(e, {
icon: "code"
});
}
}
}
};