In this case specifically of "to err is human; to forgive is divine," which sounds to me like Johnson but I'm not going to try looking up the attribution because, in this context in particular, the universe's love for irony all but guarantees I'll get it wrong.