I consider the 1st option much more readable (and often choose to edit so in questions).
– πάντα ῥεῖFeb 23 '15 at 11:56

3

If it's a one-line compiler error, the second variant might be more readable, because you don't need to scroll horizontally. But for multiple lines, you're right.
– sashoalmFeb 23 '15 at 12:08

I recommend the 1st option, that is as a code because it is much easier to read it and is more precise, you can easily identify where a line begins and eds. I always recommend others to post compiler errors as a code.
– Arun A SFeb 23 '15 at 14:12

1

The occasional bit of syntax highlighting appearing in error messages is very much preferable to having a variable-spaced font for these messages would be, IMO.
– TZHXFeb 23 '15 at 14:57

2

Would it be possible to create a quote style that uses monospace font? I'd prefer that and no scrolling versus a giant scrollbox or a gobbledegook.
– CompassFeb 24 '15 at 15:22

5

@Compass It would be good to enable scrolling if the log is multiple lines, however, as they might be aligned in a meaningfull way - for example, table data, and Java uses the ^ to point out an error on the line above - that would break with work-wrap. But for a single line it would be OK to wrap it.
– sashoalmFeb 24 '15 at 15:23

This is what I do while editing and I think it is probably the best option.
– AstroCBFeb 24 '15 at 22:44

5

It would be cool to have a special block for errors which would look e.g. like a block quote, just would not break the words (would be scrollable) and might be in some decent red color (to indicate error on the first sight). But I'm saying it would be cool since the people are not able to use even current blocks correctly.
– TLamaFeb 26 '15 at 9:45

I think putting compiler errors in a code section is the standard, since it generally makes them more readable. Most compilers output error messages that are intended to be read in a fixed-width font, and some (such as gcc) explicitly take advantage of the fixed-width font to vertically align parts of error messages that span multiple lines.

Although using code sections will occasionally result in improper automatic syntax highlighting, they're the best way to display a block of text in fixed-width font on this website. The slight annoyance caused by the syntax highlighting is not nearly as bad as the potential unreadability of error messages displayed in a variable-width font.