Skip to content
Snippets Groups Projects
Commit 3077290c authored by Jenny Zhang's avatar Jenny Zhang
Browse files

Clear previous error message

parent 8c100ffa
No related branches found
No related tags found
No related merge requests found
......@@ -52,12 +52,16 @@ export default {
submitStatement() {
// Handle submission logic and render proof tree
// Clear previous error message
this.errorMsg = '';
// Catch parsing error messages
try {
const targetAst = parse(this.givenStatement);
this.latexStatement = ast.astsToLateX(targetAst);
this.proofTree = new sequentNode(this.latexStatement);
this.renderProofTree();
} catch (error) {
this.errorMsg = 'Parsing error: ' + error.message;
// Handle the error here, such as displaying an error message to the user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment