mirror of
https://github.com/PashaBibko/LX.git
synced 2026-04-04 01:49:05 +00:00
Refactored error handling
Now uses base error class which has an abstract function for overiding how it is displayed to the console.
This commit is contained in:
@@ -45,11 +45,10 @@ namespace LX_Build
|
||||
LX_API.Init();
|
||||
|
||||
// Generates LLVM IR with the example files //
|
||||
int genExitCode = LX_API.GenIR("example/main.lx", "example/main.ll", "example/log");
|
||||
if (genExitCode != 0)
|
||||
if (LX_API.GenIR("example/main.lx", "example/main.ll", "example/log") != 0)
|
||||
{
|
||||
Console.WriteLine("An error occured whilst generating LLVM IR");
|
||||
Console.WriteLine($"Error code: {genExitCode}");
|
||||
// Quits if the IR Generation fails //
|
||||
// The C++ script handles all of the error message outputting //
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user