diff --git a/client/src/pages/Teacher/Dashboard/Dashboard.tsx b/client/src/pages/Teacher/Dashboard/Dashboard.tsx index 37c4057..3db6250 100644 --- a/client/src/pages/Teacher/Dashboard/Dashboard.tsx +++ b/client/src/pages/Teacher/Dashboard/Dashboard.tsx @@ -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; } } diff --git a/client/src/pages/Teacher/EditorQuiz/EditorQuiz.tsx b/client/src/pages/Teacher/EditorQuiz/EditorQuiz.tsx index 0a07905..9ae1eca 100644 --- a/client/src/pages/Teacher/EditorQuiz/EditorQuiz.tsx +++ b/client/src/pages/Teacher/EditorQuiz/EditorQuiz.tsx @@ -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.`) } };