summaryrefslogtreecommitdiff
path: root/src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java
diff options
context:
space:
mode:
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2020-03-10 16:38:20 +0100
committerAndrej Shadura <andrew.shadura@collabora.co.uk>2020-03-10 16:38:20 +0100
commit7cc8c823de644a510fcc434f39b53e5fffe66bfd (patch)
tree8f4d027284bb366734f610040c621a0c5dd0a12a /src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java
parent567b200b91537405689ae0ca944f121201360a6b (diff)
New upstream version 1.2020.2
Diffstat (limited to 'src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java')
-rw-r--r--src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java b/src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java
index 1d9e1ae..9c9c8e4 100644
--- a/src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java
+++ b/src/net/sourceforge/plantuml/command/PSystemAbstractFactory.java
@@ -2,7 +2,7 @@
* PlantUML : a free UML diagram generator
* ========================================================================
*
- * (C) Copyright 2009-2017, Arnaud Roques
+ * (C) Copyright 2009-2020, Arnaud Roques
*
* Project Info: http://plantuml.com
*
@@ -35,34 +35,41 @@
*/
package net.sourceforge.plantuml.command;
-import net.sourceforge.plantuml.AbstractPSystem;
+import java.util.List;
+
import net.sourceforge.plantuml.ErrorUml;
import net.sourceforge.plantuml.ErrorUmlType;
import net.sourceforge.plantuml.LineLocation;
-import net.sourceforge.plantuml.PSystemError;
+import net.sourceforge.plantuml.StringLocated;
import net.sourceforge.plantuml.api.PSystemFactory;
import net.sourceforge.plantuml.core.DiagramType;
import net.sourceforge.plantuml.core.UmlSource;
+import net.sourceforge.plantuml.error.PSystemError;
+import net.sourceforge.plantuml.error.PSystemErrorUtils;
public abstract class PSystemAbstractFactory implements PSystemFactory {
+ public static final String EMPTY_DESCRIPTION = "Empty description";
private final DiagramType type;
protected PSystemAbstractFactory(DiagramType type) {
this.type = type;
}
- final protected AbstractPSystem buildEmptyError(UmlSource source, LineLocation lineLocation) {
- final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, "Empty description", /* 1, */lineLocation);
- final PSystemError result = new PSystemError(source, err, null);
+ final protected PSystemError buildEmptyError(UmlSource source, LineLocation lineLocation,
+ List<StringLocated> trace) {
+ final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, EMPTY_DESCRIPTION, /* 1, */lineLocation);
+ // final AbstractPSystemError result = PSystemErrorUtils.buildV1(source, err, null);
+ final PSystemError result = PSystemErrorUtils.buildV2(source, err, null, trace);
result.setSource(source);
return result;
}
- final protected PSystemError buildExecutionError(UmlSource source, String stringError, LineLocation lineLocation) {
+ final protected PSystemError buildExecutionError(UmlSource source, String stringError,
+ LineLocation lineLocation, List<StringLocated> trace) {
final ErrorUml err = new ErrorUml(ErrorUmlType.EXECUTION_ERROR, stringError, /* 1, */
lineLocation);
- final PSystemError result = new PSystemError(source, err, null);
+ final PSystemError result = PSystemErrorUtils.buildV2(source, err, null, trace);
result.setSource(source);
return result;
}