Same - Object Unlawful But Intention Innocent

176. Where the direct object is illegal, the agreement is void, though the parties did not know of the illegality, since ignorance of law is no excuse.

177. EXCEPTIONS - This rule does not apply

(a) Where the agreement can be, and is, legally performed in a way not originally contemplated, if there was no intention to break the law.

(b) Where a party performs his part in ignorance of a fact which renders performance illegal, and which he is not bound to know.

Where the direct object of the parties is to do an illegal act, the agreement is void. In such a case it is immaterial that they did not know their object was illegal, for ignorance of law is no excuse.97 A contract, for instance, in violation of a statute, cannot be sustained on the ground that the parties did not know of the existence of the statute.

City has been held divisible and enforceable as to the city, even if unenforceable as to the outside territory. Fleckenstein Bros. Co. v. Fleckenstein, 76 N. J. 613, 71 Atl. 265, 24 L. R. A. (N. S.) 913. See "Contracts," Dec. Dig. (Key-No.) § 181; Cent. Dig. §§ 101-112.

95 Pickering v. Railway, L. R. 3 C. P. 250; State v. Board, 35 Ohio St 519. See "Contracts," Dec. Dig. (Key-No.) § 137; Cent. Dig. §§ 101-112.

96 Ashbury Carriage Co. v. Ricbe, L. R. 7 H. L. 653. See Anson, Cont. (8th Ed.) 207. See "Contracts," Dec. Dig. (Key-No.) § 1ST; Cent. Dig. §§ 101-112.

97 Favor v. Philbrick, 7 N. H. 326; Rosenbaum v. Credit System Co., 64 N. J. Law, 34, 44 Atl. 966. See "Contracts," Dec. Dig. (Key-No.) §§ 102, 137; Cent. Dig. §§ 462-461.

Ignorance of illegality, however, may become important if the contract admits of being performed, and is in fact performed, in a legal manner, though a detail in the performance as originally contemplated by the parties would, unknown to them, have directly resulted in a breach of the law. In a leading case on this point the defendant had chartered the plaintiff's ship to take a cargo of hay from a port in France to London, the cargo to be taken from the ship alongside and landed at a certain wharf. Unknown to the parties an order in council had forbidden the landing of French hay. The defendant on learning this, instead of landing the cargo, took it from alongside the ship in the Thames into another ship, and exported it. In an action by the plaintiff for delay of his vessel the defendant set up the unlawful intention as avoiding the contract, but without success. "We quite agree," it was said by the court, "that where a contract is to do a thing which cannot be performed without a violation of the law, it is void, whether the parties knew the law or not. But we think that, in order to avoid a contract which can be legally performed, on the ground that there was an intention to perform it in an illegal manner, it is necessary to show that there was the wicked intention to break the law; and, if this be so, the knowledge of what the law is becomes of great importance." 98