-21

Sometimes, I want to post a question on Stack Overflow and the error message will be the title of the question, but the error message is too long, more than 150 characters. Why is there a limit to the number of characters in the title of a question?

8
  • 6
    Why would you need more than 150 characters (personally I think 150 characters is too many)? The title is simply that, a title; it tells us very briefly what the question is about. You aren't one of those people that puts your entire email in the subject line and sends the body empty, are you..?
    – Thom A
    Sep 30, 2022 at 9:18
  • @Larnu, no, I said the error message would be the title of the question, but the error message is too long, more than 150 characters.
    – My Car
    Sep 30, 2022 at 9:19
  • 10
    Why would you put the error message in the title? The error goes in the post in a quote block.
    – Thom A
    Sep 30, 2022 at 9:19
  • 1
    @Larnu because that question was about that error.
    – My Car
    Sep 30, 2022 at 9:20
  • 7
    And that's why the error goes in the question body.
    – Thom A
    Sep 30, 2022 at 9:21
  • @Larnu I know, I'll change this habit.
    – My Car
    Sep 30, 2022 at 9:23
  • 8
    The title is the summary of the question. It should describe what it's about. And making it too long distracts from providing a summary.
    – VLAZ
    Sep 30, 2022 at 9:45
  • 6
    Some users try to squeeze the whole question into the title. The limit is to prevent that.
    – Dharman Mod
    Sep 30, 2022 at 11:37

1 Answer 1

23

Because we don't need entire error logs in question titles.

Just a simple example:

Exception in thread "main" java.lang.NullPointerException at Printer.printString(Printer.java:13) at Printer.print(Printer.java:9) at Printer.main(Printer.java:19)

That does not make for a good title.
You can easily make your title shorter and more descriptive:

NullPointerException when trying to do X and Y

The actual error message should be in the question's body, any way.


Now, there could be an argument to decrease/increase the allowed length, but I honestly see no strong reason to change this arbitrary limit to a different arbitrary limit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .