Hi Antony. You are correct, PTransform#expand cannot throw checked exceptions. What you need to do is wrap your checked exception in a runtime exception. For example: https://github.com/apache/beam/blob/adba4c660ef54b98055d30ee1ad7cbf440420030/examples/java/src/main/java/org/apache/beam/examples/complete/TopWikipediaSessions.java#L148-L148
For more information see the PTransform style guide: https://beam.apache.org/contribute/ptransform-style-guide/#runtime-errors-and-data-consistency Aviem. On Thu, Mar 9, 2017 at 10:46 AM Antony Mayi <[email protected]> wrote: > Hi, > > when implementing PTransform.expand what can I do with checked exceptions > that might be thrown? It is not declared to throw anything checked so how > can I fail it? > > Thanks Antony. >
