Ignorance of law is no excuse.
It is a Latin maxim, which means ignorance of fact can be excused but the ignorance of law cannot be excused. Every person should know the laws of the country where he lives. He cannot plead ignorance of it. Even the foreigner has to abide with the laws of the land as long as he happens to be in that country. This maxim is often used in Criminal Law.
If a person thinks that he has a right to kill a person outlawed or excommunicated wherever he meets him and does so, this is murder.But when a man intends to kill a thief or housebreaker in his own house, but he kills a member of his family, this will be considered as a mistake of fact and hence, there should be no criminal action.