An error of law occurs when a judge makes a mistake in interpreting or applying the law during a trial. This type of error can affect the outcome of a case, as it may lead to a wrongful judgment or decision based on incorrect legal principles. Such errors are often grounds for appealing a decision or filing for a new trial, as they challenge the integrity of the judicial process.