Raising Exceptions
Throwing exceptions with raise
Interview Relevant: Error propagation
Raising Exceptions
Signal errors manually.
Code Examples
python
1def validate(age):
2 if age < 0:
3 raise ValueError("Age must be positive")
4 return True