Include PHPUnit in dev build (no functional change).
Added more specific exceptions.