I implemented less general exception handling recently just as a base class for my DoFns, I ended up having a proto that contains the stack trace and other info just as strings. Also because I was worried about the SerializableCoder efficiency.
One option might be for the failure output type be a generic? And we provide a function for handling the exception instead? eg withFailureHandler(TupleTag<F> failureTag, SerializableFunction<Exception, F> failureHandler, Coder<F> failureCoder) edit: This is ugly and I regret saying it, but leaving it here for posterity [ Full content available at: https://github.com/apache/beam/pull/6586 ] This message was relayed via gitbox.apache.org for devnull@infra.apache.org