fix error class so that it outputs the full error message