No judgment shall be reversed, or avoided, for any error in law in the sentence imposed, but it shall be competent for the judges of the Supreme Court, in case of any such error, either to pronounce the judgment and sentence that is authorised by law, or to remit the record to the other court, in order that the court may pronounce the judgment and sentence that is authorised by law.