From e28ad4de5a0e505e4435ab4551ed30c6d51146a3 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Tue, 17 Dec 2024 21:34:19 +0100 Subject: [PATCH] better error catching --- src/Assembleur.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assembleur.cpp b/src/Assembleur.cpp index 6145cd9..06c81a7 100644 --- a/src/Assembleur.cpp +++ b/src/Assembleur.cpp @@ -205,8 +205,8 @@ std::uint32_t Assembleur::ParseInstruction(const std::string& a_Str, std::uint32 } } - } catch (std::invalid_argument& e) { - throw std::invalid_argument("[Line " + std::to_string(a_RealLine) + "] " + e.what()); + } catch (std::exception& e) { + throw std::invalid_argument(" [Line " + std::to_string(a_RealLine) + "] " + e.what() + "\n" + a_Str); } return 0;