added dump function to error class