This rule gives the trial judge substantial discretion.
in applying the rule,``a judge's ruling will not be the basis for reversal of a criminal conviction unless a defendant's substantial rights are affected . ''