I was thinking (oh crap duck!) about the term "ignorance of the law is no excuse" and wondered if there is actually anyone who does know every single law. If there isn't, then ignorance of the law is actually an excuse.
It might be an excuse for
why you broke the law, but it does not excuse you from the legal ramifications of breaking the law.
That being said, there's still the whole
Mens rea thing that can be used as a defense in some cases.
Too, the judge can consider your ignorance during the sentencing and for a first time offender you might get a lesser punishment.