Task task = new Task(this.getHost().getName()+"-task", 300E6 , 0);
try {
task.execute();
- } catch (HostFailureException | TaskCancelledException e) { // If your compiler fails on that multicatch, please proceed to Java 1.7 or higher
+ } catch (HostFailureException | TaskCancelledException e) {
Msg.error(e.getMessage());
e.printStackTrace();
}