In many cases you would be able to restore your partition table and recover your partitions without any loss of data if you just backup the table before changing it and restore it on failure. Why doesn't gparted / ubiquity do this for you? If it fails the best thing it can do for you is try to revert the partition table.