dataminer-pool-manager/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/exceptions/AnsibleException.java

26 lines
551 B
Java
Raw Normal View History

package org.gcube.dataanalysis.dataminer.poolmanager.service.exceptions;
import org.gcube.dataanalysis.dataminer.poolmanager.util.exception.DMPMException;
2023-01-18 17:56:48 +01:00
public class AnsibleException extends DMPMException {
2023-01-18 17:56:48 +01:00
/**
*
2023-01-18 17:56:48 +01:00
*/
private static final long serialVersionUID = 6772009633547404120L;
private int returnCode;
2023-01-18 17:56:48 +01:00
public AnsibleException(int returnCode) {
super ("Ansible work failed");
this.returnCode =returnCode;
2023-01-18 17:56:48 +01:00
}
2023-01-18 17:56:48 +01:00
@Override
public String getErrorMessage() {
return "Installation failed. Return code=" + this.returnCode;
2023-01-18 17:56:48 +01:00
}
2023-01-18 17:56:48 +01:00
}