mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Print exception stack trace when catch generic exception in CitrixResourceBase
This commit is contained in:
parent
32cb4da2f3
commit
acaba52736
@ -325,7 +325,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
try {
|
||||
vm.destroy(conn);
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("Catch Exception " + e.getClass().getName() + ": unable to destroy VM " + vmRec.nameLabel + " due to " + e.toString());
|
||||
s_logger.warn("Catch Exception " + e.getClass().getName() + ": unable to destroy VM " + vmRec.nameLabel + " due to ", e);
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
@ -1912,7 +1912,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
stats = getVmStatsRawXML(conn);
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
s_logger.warn("Error whilst collecting raw stats from plugin:" + e1);
|
||||
s_logger.warn("Error whilst collecting raw stats from plugin: ", e1);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1931,7 +1931,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
try {
|
||||
doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(statsSource);
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("Exception caught whilst processing the document via document factory:"+e);
|
||||
s_logger.warn("Exception caught whilst processing the document via document factory:", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -2781,7 +2781,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
vm.hardShutdown(conn);
|
||||
} catch (Exception e) {
|
||||
String msg = "VM hardshutdown failed due to " + e.toString();
|
||||
s_logger.warn(msg);
|
||||
s_logger.warn(msg, e);
|
||||
}
|
||||
}
|
||||
if (vm.getPowerState(conn) == VmPowerState.HALTED) {
|
||||
@ -2789,12 +2789,12 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
vm.destroy(conn);
|
||||
} catch (Exception e) {
|
||||
String msg = "VM destroy failed due to " + e.toString();
|
||||
s_logger.warn(msg);
|
||||
s_logger.warn(msg, e);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String msg = "VM getPowerState failed due to " + e.toString();
|
||||
s_logger.warn(msg);
|
||||
s_logger.warn(msg, e);
|
||||
}
|
||||
}
|
||||
if (mounts != null) {
|
||||
@ -2805,7 +2805,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
vbds = vdi.getVBDs(conn);
|
||||
} catch (Exception e) {
|
||||
String msg = "VDI getVBDS failed due to " + e.toString();
|
||||
s_logger.warn(msg);
|
||||
s_logger.warn(msg, e);
|
||||
continue;
|
||||
}
|
||||
for (VBD vbd : vbds) {
|
||||
@ -2814,7 +2814,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
vbd.destroy(conn);
|
||||
} catch (Exception e) {
|
||||
String msg = "VBD destroy failed due to " + e.toString();
|
||||
s_logger.warn(msg);
|
||||
s_logger.warn(msg, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3001,8 +3001,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
try {
|
||||
task.destroy(conn);
|
||||
} catch (Exception e1) {
|
||||
s_logger.warn("unable to destroy task(" + task.toString() + ") on host(" + _host.uuid + ") due to "
|
||||
+ e1.toString());
|
||||
s_logger.warn("unable to destroy task(" + task.toString() + ") on host(" + _host.uuid + ") due to ", e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3019,7 +3018,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("swift download failed due to " + e.toString());
|
||||
s_logger.warn("swift download failed due to ", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -3035,7 +3034,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("swift download failed due to " + e.toString());
|
||||
s_logger.warn("swift download failed due to ", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -3050,7 +3049,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("swift download failed due to " + e.toString());
|
||||
s_logger.warn("swift download failed due to ", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -3135,8 +3134,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
try {
|
||||
task.destroy(conn);
|
||||
} catch (Exception e1) {
|
||||
s_logger.warn("unable to destroy task(" + task.toString() + ") on host(" + _host.uuid + ") due to "
|
||||
+ e1.toString());
|
||||
s_logger.warn("unable to destroy task(" + task.toString() + ") on host(" + _host.uuid + ") due to ", e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4093,7 +4091,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
sr = pbd.getSR(conn);
|
||||
srRec = sr.getRecord(conn);
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("pbd.getSR get Exception due to " + e.toString());
|
||||
s_logger.warn("pbd.getSR get Exception due to ", e);
|
||||
continue;
|
||||
}
|
||||
String type = srRec.type;
|
||||
@ -4106,7 +4104,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
||||
pbd.destroy(conn);
|
||||
sr.forget(conn);
|
||||
} catch (Exception e) {
|
||||
s_logger.warn("forget SR catch Exception due to " + e.toString());
|
||||
s_logger.warn("forget SR catch Exception due to ", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user