Exceptions
The way a running program signals that something went wrong, so that code can catch the problem and carry on, or stop with a clear message instead of carrying on with nonsense.
Depth 1 · Foundation
You can catch the specific exceptions you expect with try and except (with else and finally), raise your own when a function gets a value it can't use, and follow an exception up through the calls that were running.
Sign in to prove what you know with a short quiz, see how deep you've gone, and earn XP for it.
Sign in with GoogleDepths of understanding
- 1
Foundation
You can catch the specific exceptions you expect with try and except (with else and finally), raise your own when a function gets a value it can't use, and follow an exception up through the calls that were running.
Your path here
What's still between you and Exceptions, depth 1, in the order you can learn it.
- 1ProgramDepth 1 · Foundation · Program Basics
- 2ExpressionDepth 1 · Foundation · Program Basics
- 3Variables in codeDepth 1 · Foundation · Program Basics
- 4Program stateDepth 1 · Foundation · Program Basics
- 5Input and outputDepth 1 · Foundation · Program Basics
- 6Functions in codeDepth 1 · Foundation · Functions
- 7Return valuesDepth 1 · Foundation · Functions
- 8BooleansDepth 1 · Foundation · Control Flow
- 9ConditionalsDepth 1 · Foundation · Control Flow
- 10LoopsDepth 1 · Foundation · Control Flow
- 11Accumulator patternDepth 1 · Foundation · Control Flow
- 12Floating-point numbersDepth 1 · Foundation · Data Types
- 13Basic typesDepth 1 · Foundation · Data Types
- 14Character encodingDepth 1 · Foundation · Data Types
- 15StringsDepth 1 · Foundation · Data Types
- 16Type conversionDepth 1 · Foundation · Data Types
- 17ExceptionsDepth 1 · Foundation · Writing Correct Code