Suppose I want to ask a question and want to mention an error in my program like this:

I keep on receiving the following error "Uncaught Syntax Error: Unexpected token : ".

Is the above sentence correct or I should change it to :

I keep on receiving this error "Uncaught Syntax Error: Unexpected token : ".

Please note that I'm providing the error in place and not in a line below the sentence.

  • As Christian has said, both are correct. However, in either case you should add a colon after "error". (You should not do so in his examples.)
    – BobRodes
    Apr 13, 2014 at 20:57

1 Answer 1


Both sentences will be understood.

The more correct one is the one using 'the following error'.

To use a pronoun like 'this' in writing you should identify what you are referring to first.

Or you could just say:

  • I keep on receiving the error "Uncaught....".
  • I keep on receiving an "Uncaught Syntax" error. (if the error text is shorter and doesn't break up your sentence too much).

You must log in to answer this question.

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