(a) A witness is privileged from arrest while attending, going to, and returning from court.
(b) The privilege provided by this section extends for a period computed by allowing one day of travel for each 150 miles of the distance from the courthouse to the witness's residence.
(c) This section does not apply to an arrest for a felony, treason, or breach of the peace.