Changed switch error function

to ignore single errors if required.