added exception handler

This addresses #15720