Remove non-exhaustive pattern matching warnings by explicit exceptions