The general rule is that mistake about what's against the law is no excuse.
Mistake as to Other Law
If the mistake is about a law other than criminal law, then it may be an excuse. For example, if you did not know that theft from your spouse was against the law, too bad. But if you did not know the intricacies of marital property law, that may get you off the hook (with the law, not your spouse). It can be a very close question, however.
Mistake as to Fact
If the mistake was about some fact, this may also get you off the hook. For example, mistake about whether you had permission from your spouse to pawn her favorite earrings.