[Debug] generalized ErrorHandler