returns an error when using -h and --net

Close #5708