diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-18 22:00:21 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-18 22:00:21 +0100 |
| commit | 25ba4e852d6ad15d91095e844bde858383c6b1e3 (patch) | |
| tree | 6c854c9d020cddc6aecb1a633841e5142910f4e2 /src/CompilerKit | |
| parent | 5480f17a96af8868de5fbab9892d8f23d9ea627d (diff) | |
[CHORE] Update try/catch handler code.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/CompilerKit')
| -rw-r--r-- | src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp index e758fdc..85ecc66 100644 --- a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp +++ b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cpp @@ -30,16 +30,13 @@ Int32 AssemblyFactory::Compile(STLString sourceFile, const Int32& arch) { try { std::filesystem::copy(sourceFile, compiledUnit); - auto ret = this->fMounted->CompileToFormat(compiledUnit, arch); - std::filesystem::remove(compiledUnit); - return ret; - } catch (...) { - auto ret = this->fMounted->CompileToFormat(compiledUnit, arch); - std::filesystem::remove(compiledUnit); - return ret; - } + } catch (...) {} + + auto ret = this->fMounted->CompileToFormat(compiledUnit, arch); + + std::filesystem::remove(compiledUnit); - return NECTAR_UNIMPLEMENTED; + return ret; } ///! @brief mount assembly backend. |
