Shabbos 11:6-12:1
Shabbos 11:6
If a person threw something and he remembered that it was Shabbos after the object left his hand and then another person caught it, a dog caught it, or it was destroyed by a fire, he is exempt. If he threw something intending to wound a person or an animal and he remembered it was Shabbos before making the wound, he is exempt. The general rule is that a person is not required to bring a sin offering unless both the beginning and the conclusion of the action are unintentional. If something is intentional at the beginning and unintentional at the end, or vice versa, one would be exempt.
Shabbos 12:1
How much does one have to build on Shabbos in order to be liable? For building any amount, cutting stone, striking with a hammer, using an adze (a cutting tool similar to an axe) and drilling a hole, one is liable for any amount of work. The general principle is that any act of labor whose result endures makes one liable. Rabban Shimon ben Gamliel says this even includes hitting an anvil with a sledgehammer because doing so improves the surface of the hammer.