mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-05 22:35:36 +00:00
Initial commit
This commit is contained in:
parent
e523533d17
commit
10cceacca6
50 changed files with 1280 additions and 0 deletions
25
vscode/Chapter04/CallStackExceptionHandling/Program.cs
Normal file
25
vscode/Chapter04/CallStackExceptionHandling/Program.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using CallStackExceptionHandlingLib;
|
||||
using static System.Console;
|
||||
|
||||
WriteLine("In Main");
|
||||
Alpha();
|
||||
|
||||
void Alpha()
|
||||
{
|
||||
WriteLine("In Alpha");
|
||||
Beta();
|
||||
}
|
||||
|
||||
void Beta()
|
||||
{
|
||||
WriteLine("In Beta");
|
||||
try
|
||||
{
|
||||
Calculator.Gamma();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
WriteLine($"Caught this: {ex.Message}");
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue