Consider someone is writing a message (or a question at StackOverflow). The context is following:
In my code, I have the following line:
int foo = Bar();
However, the compiler returns an error:
line 42: Bar() is unknown function
I’m puzzled to choose a proper verb instead of “returns”. I’ve seen people using various verbs for it, but I stuck every time I read it:
- “returns” can be confused with a function return value;
- “throws” is for exceptions;
- “prints” has a little sense as the compiler output is not always printed;
- “outs”, “outputs”, or “gives” do not sound professional;
- “the compiler complains” sounds a bit like personification of the compiler;
What is the proper verb in this situation?
7
“Compiler reports an error” sounds appropriate and is actually used in literature.
It does not necessarily “fail” or “return”, because it can carry on and report more further errors, warnings or notes.
I would go with
Compile fails with the error “Fizzy buzzy Bizzy fuzzy”
I would stay far away from throw, also print and return aren’t particularly great but throw is a downright misnomer.
1
You are quite right that neither “return” nor “print” fits this situation well. To describe it accurately would require a longer verb phrase such as “compilation fails with an ‘unknown function’ error” or “results in an ‘unknown function’ error”.
Luckily, the verb is the least important part of a question title – I’d say that it is completely unnecessary. What matters is that you manage to describe the situation and the error type, e.g. “‘Unknown function’ error with in-line declaration”. Combined with the Tag “Java” that tells someone browsing the overview all they need to know.
1