Catch command exceptions