Afficher error (console) pour éviter warnings eslint

This commit is contained in:
C. Fuhrman 2025-02-02 12:54:25 -05:00
parent 2de7671666
commit f781173695
2 changed files with 4 additions and 3 deletions

View file

@ -196,7 +196,8 @@ const Dashboard: React.FC = () => {
// questions[i] = QuestionService.ignoreImgTags(questions[i]);
const parsedItem = parse(questions[i]);
Template(parsedItem[0]);
} catch (_error) {
} catch (error) {
console.error('Error parsing question:', error);
return false;
}
}

View file

@ -182,8 +182,8 @@ const QuizForm: React.FC = () => {
if (fileInputRef.current) {
fileInputRef.current.value = '';
}
} catch (_error) {
window.alert(`Une erreur est survenue.\n Veuillez réessayer plus tard`)
} catch (error) {
window.alert(`Une erreur est survenue.\n${error}\nVeuillez réessayer plus tard.`)
}
};