When enabling setRecordThrowableMessage I was expecting to receive the message of my exception, but instead it prints the cascading.pipe.OperatorException message.
16/11/03 08:22:22 WARN element.TrapHandler: exception trap on branch: 'recordInputFunction', for fields: [{2}:'LINE', 'RECORD_TYPE'] tuple: ['{coverage:"abcd"}', 'COVERA...
cascading.pipe.OperatorException: [recordInputFunction][com.optum.acc.patient.PatientSubAssembly.<init>(PatientSubAssembly.java:32)] operator Each failed executing operation
at cascading.flow.stream.element.FunctionEachStage.receive(FunctionEachStage.java:108)
at cascading.flow.stream.element.FunctionEachStage.receive(FunctionEachStage.java:40)
at cascading.flow.stream.element.SourceStage.map(SourceStage.java:110)
at cascading.flow.stream.element.SourceStage.call(SourceStage.java:60)
at cascading.flow.stream.element.SourceStage.call(SourceStage.java:40)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: COVERAGE:{coverage:"abcd"}. Coverage patientId must not be null.
at com.optum.acc.input.RecordInputFunction.operate(RecordInputFunction.java:112)
at cascading.flow.stream.element.FunctionEachStage.receive(FunctionEachStage.java:100)
... 8 more
My understanding is that any exception that gets thrown by one of my operations will get wrapped by this OperatorException, so it will always print your message, not mine. Could this be changed to print Throwable.getCause().getMessage() instead so my message is printed? Or is your message the expected output and I must print the entire setRecordThrowableStackTrace message in order to see my throwable message?