summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-20 15:53:46 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-20 15:55:09 +0200
commit2fd6271bdc6c2382194cf79dd67a9482d152e94e (patch)
treece2763cdcbb154b03e631040930e67e9c4e3ac59 /dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc
parent13ea83fa23ed118e7310b641d2895b830b2267ac (diff)
feat(cxxdrv): Improving and patching C++'s driver segfault at exit.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc')
-rw-r--r--dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc b/dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc
index 11655fb..e6072d9 100644
--- a/dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc
+++ b/dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc
@@ -28,7 +28,11 @@ Int32 AssemblyFactory::Compile(std::string sourceFile, const Int32& arch) noexce
if (arch != fMounted->Arch()) return LIBCOMPILER_INVALID_ARCH;
- return fMounted->CompileToFormat(sourceFile, arch);
+ try {
+ return fMounted->CompileToFormat(sourceFile, arch);
+ } catch (std::exception& e) {
+ return LIBCOMPILER_EXEC_ERROR;
+ }
}
///! @brief mount assembly backend.