Bifalgorithm post · Computer science one · Checked Exceptions
How can a program throw and catch a custom exception?
How can a program throw and catch a custom exception? (Computer science one · Checked Exceptions) — "In our code we can throw and catch this new type of except…
Ideas in this flowchart
- Behandlung einer ComplexRootException
- ComplexRootException ist ein neuer Ausnahmetyp.
- Die Diskriminante b*b - 4*a*c ist kleiner als null.
- Eine ComplexRootException mit der Nachricht „Cannot Handle complex roots“ wird ausgelöst.
- Der Aufruf zur Berechnung der komplexen Wurzeln befindet sich in einem try-Block.
- getComplexRoot01(a, b, c) wird ausgeführt.
- Ein catch-Block fängt die ComplexRootException ab.
- Die Ausnahme wird innerhalb des catch-Blocks behandelt.