Package net.sourceforge.plantuml.mcp
Class McpResult
java.lang.Object
net.sourceforge.plantuml.mcp.McpResult
-
Constructor Details
-
McpResult
-
McpResult
-
-
Method Details
-
renderError
Builds a result for a diagram that parsed correctly but failed to render. The structured counters fromdiagramare kept, but the result is marked as not OK and carries the rendering error message.- Parameters:
diagram- the parsed (non-error) diagrammessage- the rendering error message- Returns:
- a not-OK result describing the rendering failure
-
badInput
-
noAtStart
-
isOk
public boolean isOk()- Returns:
trueif the source parsed without error
-
getDiagramType
- Returns:
- the detected diagram type when OK (e.g. "SequenceDiagram"), or
nullwhen not applicable
-
getLineCount
public int getLineCount()- Returns:
- the number of source lines of the checked diagram
-
getWarnings
- Returns:
- the non-fatal warnings, never
null(possibly empty)
-
getErrorLineNumber
public int getErrorLineNumber()- Returns:
- the 1-based line of the error, or -1 when
isOk()istrue
-
getErrorMessage
- Returns:
- the error message, or
nullwhenisOk()istrue
-
getErrorLine
-
getErrorContext
- Returns:
- the offending source line, or
nullwhen not available
-
getSvg
-