Class BeanIOErrorHandler

  • All Implemented Interfaces:
    org.beanio.BeanReaderErrorHandler

    public class BeanIOErrorHandler
    extends org.beanio.BeanReaderErrorHandlerSupport
    A BeanReaderErrorHandler to handle errors during parsing. This error handler is prototype scoped and provides access to the current Exchange. You can perform any custom initialization logic in the init() method.
    • Constructor Detail

      • BeanIOErrorHandler

        public BeanIOErrorHandler()
    • Method Detail

      • init

        public void init()
      • getExchange

        public org.apache.camel.Exchange getExchange()
        The current exchange
      • setExchange

        public void setExchange​(org.apache.camel.Exchange exchange)
      • handleErrorAndAddAsResult

        public void handleErrorAndAddAsResult​(Object result)
        Sets a custom POJO as the result from handling an beanio error.
      • invalidRecord

        public void invalidRecord​(org.beanio.InvalidRecordException ex)
                           throws Exception
        Overrides:
        invalidRecord in class org.beanio.BeanReaderErrorHandlerSupport
        Throws:
        Exception
      • unexpectedRecord

        public void unexpectedRecord​(org.beanio.UnexpectedRecordException ex)
                              throws Exception
        Overrides:
        unexpectedRecord in class org.beanio.BeanReaderErrorHandlerSupport
        Throws:
        Exception
      • unidentifiedRecord

        public void unidentifiedRecord​(org.beanio.UnidentifiedRecordException ex)
                                throws Exception
        Overrides:
        unidentifiedRecord in class org.beanio.BeanReaderErrorHandlerSupport
        Throws:
        Exception