TrapProps Throwable-Message Behavior

7 views
Skip to first unread message

Kyle Winkelman

unread,
Nov 3, 2016, 9:08:29 AM11/3/16
to cascading-user
When enabling setRecordThrowableMessage I was expecting to receive the message of my exception, but instead it prints the cascading.pipe.OperatorException message.

Below is the setLogThrowableStackTrace 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

   - Expected
   - Result

If I wanted the Result above I could use the setRecordElementTrace to get most of it.

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?

Thanks,
Kyle Winkelman

Chris K Wensel

unread,
Nov 3, 2016, 2:01:40 PM11/3/16
to cascadi...@googlegroups.com
sounds like we could add a new property to record ThrowableCauseMessage.

I wouldn’t throw out the current implementation as you would lose the line number where the operation was declared.

a patch for this would be great.

ckw

--
You received this message because you are subscribed to the Google Groups "cascading-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascading-use...@googlegroups.com.
To post to this group, send email to cascadi...@googlegroups.com.
Visit this group at https://groups.google.com/group/cascading-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/cascading-user/7ba7ca78-b8b6-4ea0-8d53-84d0ad22c62f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages