Commit 95c9b79
authored
[generator] Avoid 'error (…):' construct in diagnostic messages (#851)
Context: #850
When a parsing issue is hit when importing Javadoc info, an "error"
is printed out like this:
Error (31:41): Syntax error, expected: #PCDATA, <tt>, <TT>, <i>, <I>, {@code, {@docroot}, {@inheritdoc}, {@link, {@linkplain, {@literal, {@value}, {@value, UnknownHtmlElementStart, </tt>, </TT>, </i>, </I>, </p>, </P>, <p>, <P>, <pre>, <PRE>, @author, @apiSince, @deprecated, @deprecatedSince, @exception, @param, @return, @see, @Serialdata, @serialField, @SInCE, @throws, @[unknown], @Version
{@link #getCurrentTrackSelections()}}.</li>
This is intended to be informational, but this output format triggers
the MSBuild error parsing regex, and is interpreted as an actual
error, causing the build to fail.
Avoid the error by prepending `JavadocImport-` to the
`LogMessage.Level` enum value, so that MSBuild doesn't interpret the
string as an error and the build can successfully complete:
JavadocImport-Error (31:41): Syntax error, expected: #PCDATA, <tt>, <TT>, <i>, <I>, {@code, {@docroot}, {@inheritdoc}, {@link, {@linkplain, {@literal, {@value}, {@value, UnknownHtmlElementStart, </tt>, </TT>, </i>, </I>, </p>, </P>, <p>, <P>, <pre>, <PRE>, @author, @apiSince, @deprecated, @deprecatedSince, @exception, @param, @return, @see, @Serialdata, @serialField, @SInCE, @throws, @[unknown], @Version
{@link #getCurrentTrackSelections()}}.</li>1 parent 7c4f7db commit 95c9b79
File tree
1 file changed
+1
-1
lines changed- tools/generator/Java.Interop.Tools.Generator.ObjectModel
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
0 commit comments