Even if a defendant fails to fully complete a crime, he or she can be charged with attempt, i.e. in the case of an uncompleted or inchoate offense. While the requirements for proving attempt vary by jurisdiction, generally specific intent must be shown (even if the underlying crime was a general intent or strict liability offense) as well as a substantial step towards actually committing the crime itself.
See, e.g. U.S. v. Resendiz-Ponce, 549 U.S. 102 (2007).