- public static DmaapOutgoingMessage buildDmaapOutgoingMessageWithUnexpectedError(DmaapMessage event,Exception inputException) {
- DmaapOutgoingMessage dmaapOutgoingMessage = null;
- String errMsg = StringUtils.isEmpty(inputException.getMessage())? inputException.toString() : inputException.getMessage();
+ public static DmaapOutgoingMessage buildDmaapOutgoingMessageWithUnexpectedError(DmaapMessage event,
+ Exception inputException) {
+
+ if (event == null || inputException == null) {
+ throw new IllegalArgumentException("One of given arguments is null");
+ }
+
+ DmaapOutgoingMessage dmaapOutgoingMessage;
+ String errMsg =
+ StringUtils.isEmpty(inputException.getMessage()) ? inputException.toString() : inputException.getMessage();