From c1c587fffe0dc3cc703829a4a4501afb1fee1a45 Mon Sep 17 00:00:00 2001 From: lzh3636 Date: Wed, 28 Mar 2018 06:02:16 -0400 Subject: [PATCH] CLOUDSTACK-10334: Fix inadequate information for handling catch clauses (#2510) * Add log stack traces * Change log stack traces Add original stack trace to the new throw and delete the error logs --- .../java/com/cloud/api/dispatch/ParamProcessWorker.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/com/cloud/api/dispatch/ParamProcessWorker.java b/server/src/main/java/com/cloud/api/dispatch/ParamProcessWorker.java index feefaabc551..f030209c9a5 100644 --- a/server/src/main/java/com/cloud/api/dispatch/ParamProcessWorker.java +++ b/server/src/main/java/com/cloud/api/dispatch/ParamProcessWorker.java @@ -258,13 +258,11 @@ public class ParamProcessWorker implements DispatchWorker { } } catch (final IllegalArgumentException e) { - s_logger.error("Error initializing command " + cmd.getCommandName() + ", field " + field.getName() + " is not accessible."); throw new CloudRuntimeException("Internal error initializing parameters for command " + cmd.getCommandName() + " [field " + field.getName() + - " is not accessible]"); + " is not accessible]", e); } catch (final IllegalAccessException e) { - s_logger.error("Error initializing command " + cmd.getCommandName() + ", field " + field.getName() + " is not accessible."); throw new CloudRuntimeException("Internal error initializing parameters for command " + cmd.getCommandName() + " [field " + field.getName() + - " is not accessible]"); + " is not accessible]", e); } }