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
This commit is contained in:
lzh3636 2018-03-28 06:02:16 -04:00 committed by Rafael Weingärtner
parent ba61b512b2
commit c1c587fffe
1 changed files with 2 additions and 4 deletions

View File

@ -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);
}
}