diff options
author | Marius Ungureanu <maungu@microsoft.com> | 2021-02-26 00:37:12 +0300 |
---|---|---|
committer | Marius Ungureanu <maungu@microsoft.com> | 2021-02-26 00:37:12 +0300 |
commit | 0d905e12ee4336a428fe021805c3fb3b0f3c59e6 (patch) | |
tree | d32a30f345e598769d308fd446419de192a82ec9 | |
parent | 9affe4813987b009022ab7b10e55f81f4a37344c (diff) |
Add some more markers where ExitCode should be set to non-zero
-rw-r--r-- | src/framework/GuiUnit/MonoMacMainLoopIntegration.cs | 1 | ||||
-rw-r--r-- | src/framework/GuiUnit/TestRunner.cs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs b/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs index 6774694..6ff8100 100644 --- a/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs +++ b/src/framework/GuiUnit/MonoMacMainLoopIntegration.cs @@ -33,6 +33,7 @@ namespace GuiUnit var errPtr = dlerror (); var errStr = (errPtr == IntPtr.Zero)? "<unknown error>" : Marshal.PtrToStringAnsi (errPtr); Console.WriteLine ("WARNING: Cannot load {0}: {1}", dylibPath, errStr); + throw new InvalidOperationException("Unable to initialize Xamarin.Mac"); } var initMethod = Application.GetMethod ("Init", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static); diff --git a/src/framework/GuiUnit/TestRunner.cs b/src/framework/GuiUnit/TestRunner.cs index 3950cf3..0e921be 100644 --- a/src/framework/GuiUnit/TestRunner.cs +++ b/src/framework/GuiUnit/TestRunner.cs @@ -238,6 +238,7 @@ namespace GuiUnit catch (FileNotFoundException ex) { writer.WriteLine(ex.Message); + ExitCode = 1; } catch (Exception ex) { @@ -272,6 +273,7 @@ namespace GuiUnit BeforeShutdown (null, EventArgs.Empty); } catch (Exception ex) { Console.WriteLine ("Unexpected error during `BeforeShutdown`: {0}", ex); + ExitCode = 1; } finally { MainLoop.Shutdown (); } |