Skip to content

Commit

Permalink
Improve uncaught exception behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
chamons committed May 20, 2022
1 parent 2597435 commit 0b89a17
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tools/nnyeah/nnyeah/Errors.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tools/nnyeah/nnyeah/Errors.resx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
<value>If you want to compare assemblies, the earlier and later assembly options *must* be set.</value>
</data>

<data name="N0008" xml:space="preserve">
<value>Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new</value>
</data>

<data name="E0001" xml:space="preserve">
<value>Input file '{0}' doesn't exist.</value>
</data>
Expand Down
7 changes: 6 additions & 1 deletion tools/nnyeah/nnyeah/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ static int Main (string [] args)
try {
Main2 (args);
return 0;
} catch (Exception e) {
}
catch (ConversionException e) {
Console.Error.WriteLine (e.Message);
return 1;
} catch (Exception e) {
Console.Error.WriteLine (Errors.N0008);
Console.Error.WriteLine (e);
return 1;
}
}

Expand Down

0 comments on commit 0b89a17

Please sign in to comment.