![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.command.ProtectedCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.command;
import java.util.Objects;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.utils.BlocLines;
import net.sourceforge.plantuml.utils.Log;
import net.sourceforge.plantuml.version.Version;
public class ProtectedCommand implements Command {
private final Command cmd;
public ProtectedCommand(Command cmd) {
this.cmd = Objects.requireNonNull(cmd);
}
public CommandExecutionResult execute(S system, BlocLines lines) {
try {
// WasmLog.log("...running " + cmd.getClass().getName() + " ...");
final CommandExecutionResult result = cmd.execute(system, lines);
// if (result.isOk()) {
// // TRACECOMMAND
// System.err.println("CMD = " + cmd.getClass());
// }
return result;
} catch (Throwable t) {
Log.error("Error " + t);
Logme.error(t);
String msg = "You should send a mail to [email protected] or post to https://plantuml.com/qa with this log (V"
+ Version.versionString() + ")";
Log.error(msg);
msg += " " + t.toString();
return CommandExecutionResult.error(msg, t);
}
}
public CommandControl isValid(BlocLines lines) {
return cmd.isValid(lines);
}
public String[] getDescription() {
return cmd.getDescription();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy