Failure to comply with any provision of this part shall not create a cause of action or claim for damages against the state, a political subdivision of the state, a government employee or other official or entity, and no such cause of action shall be maintained. No defendant or person charged with a criminal offense may claim any prejudice or assign any error based upon the failure to comply with any provision of this part by the court or any other official of the state.