format errors with line breaks