Yes, using `exit(1)` directly is fine.