“Everyone may err who hath not the rule of righteousness within him: and therefore it is impossible God should err, because his own will is the rule of his actions: He is every way a law unto himself…. Created creatures how perfect soever in their nature, have the will of God for their rule and law: which though it be within them, yet it is not Them, and so they may act beside it. The hand of the Artificer often fails in cutting or fashioning the work he is about, because his hand is not the rule by which he works: his hand works by a rule or line, his hand is not that rule or line, Therefore he sometimes strikes right, and sometimes strikes wrong; but if the hand of a man were the rule by which he works, then it were impossible that ever he should work amiss. Thus it is with God, the very will of God which acts, is the rule by which he acts, hence it is impossible for God to fail; Angels and men act by a rule prescribed, their will is one thing, and the rule is another; the power by which they work is one thing, and the direction by which they work is another; and therefore the most perfect creature may possibly swerve and err in acting; Only he cannot err in anything he doth, whose will is the perfect rule of all he doth.”
~Joseph Caryl, Practical Observations on Job, 2:140.
Source: http://www.puritanboard.com/showthread.php/89320-Theories-about-Adam-s-fall/page4, Comment #127