Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Prog2-SS2020-Wienkop
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Uwe Wienkop
Prog2-SS2020-Wienkop
Commits
90e4489d
Commit
90e4489d
authored
May 26, 2020
by
Uwe Wienkop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2020-05-26
parent
58ad06df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
.vs/prog2-ss2020-wienkop/DesignTimeBuild/.dtbcache.v2
.vs/prog2-ss2020-wienkop/DesignTimeBuild/.dtbcache.v2
+0
-0
.vs/prog2-ss2020-wienkop/v16/.suo
.vs/prog2-ss2020-wienkop/v16/.suo
+0
-0
06 UebgDiExceptions/Program.cs
06 UebgDiExceptions/Program.cs
+17
-2
No files found.
.vs/prog2-ss2020-wienkop/DesignTimeBuild/.dtbcache.v2
View file @
90e4489d
No preview for this file type
.vs/prog2-ss2020-wienkop/v16/.suo
View file @
90e4489d
No preview for this file type
06 UebgDiExceptions/Program.cs
View file @
90e4489d
...
...
@@ -6,11 +6,26 @@ namespace _06_UebgDiExceptions
// eine zweite Dummy-Methode Funktion2, die wiederum einen try-catch Block besitzt und
// eine Methode Funktion3, die bei ihrem Aufruf einen throw mit einer selbst
// erstellten Fehlerklasse zur Folge hat. Main ruft Funktion1, Funktion1 ruft Funktion2
// und Funktion2 ruft Funktion3.
// und Funktion2 ruft Funktion3.
Setzen Sie hinter die catches jeweils ein finally
// Schreiben Sie entsprechende catch-Methoden, werfen Sie den Fehler weiter
// und stellen Sie sicher, dass das Programm unter keinen Umständen beendet wird!
// und stellen Sie sicher, dass das Programm unter keinen Umständen mit einer Exception beendet wird!
class
Program
{
static
void
Funktion2
()
{
try
{
Console
.
WriteLine
(
"Letzte Anweisung des try-Blocks von Funktion 2"
);
}
catch
()
finally
{
Console
.
WriteLine
(
"Finally von Funktion 2"
);
}
Console
.
WriteLine
(
"Ende von Funktion2"
);
}
static
void
Main
(
string
[]
args
)
{
Console
.
WriteLine
(
"Hello World!"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment