catch exception for invalid or well-known ports