When I clicked the button, I got the error "ReferenceError: function is not defined".
In this sentence, I am telling somebody that when I click a button in a software application, I get an error. The remaining part of the sentence, i.e. "ReferenceError: function is not defined", describes the error/tells what exactly the error is.
Likewise, in the following sentence, I am telling that he used a(the?) proverb, and then telling what the proverb was.
He used the proverb "A rolling stone gathers no mass", which described the gist of the story perfectly.
The question is that in sentences like these, when we talk about a thing, and then immediately describe what the thing is, is there any punctuation required between the first piece of information, and the description of the thing we have just talked about (like a colon)?
When I clicked the button, I got the error : "ReferenceError: function is not defined".
How would you write these sentences correctly in formal English?