diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-20 15:53:46 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-20 15:55:09 +0200 |
| commit | 2fd6271bdc6c2382194cf79dd67a9482d152e94e (patch) | |
| tree | ce2763cdcbb154b03e631040930e67e9c4e3ac59 /dev/LibCompiler/src/AssemblyFactory+AssemblyInterface.cc | |
| parent | 13ea83fa23ed118e7310b641d2895b830b2267ac (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.cc | 6 |
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. |
