pwgen2: catch integer conversion error