cloudformation-cli-java-plugin
cloudformation-cli-java-plugin copied to clipboard
Fixed problem when original exception message was lost.
*Issue #351 * When the exception was thrown with operation name the original errorMessage was lost. For example
throw new CfnGeneralServiceException("Operation", new RuntimeException("something happend");
results in "Error occurred during operation 'Operation'." message. If operation parameter would not be passed then the message would contain "something happend".
Description of changes: I changed how Exceptions are constructed so behavior is consistent. If "operation" is passed in the original message is preserved.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.