What if someone did an act that he thought was chillul Shabbos?

From Q&A Daf Yomi Review - Real Clear Daf by R Shmuel Wise.