Whenever a homicide appears to be justifiable or excusable, the person charged must, upon his trial, be acquitted and discharged.