0

I am using RxBusfor event passing from adapter class to fragment for specific subject

RxBus.publish(RxBus.SUBJECT_DELETE_SCHEME_FROM_CART, option)

and subscribe code is

RxBus.subscribe(RxBus.SUBJECT_DELETE_SCHEME_FROM_CART, this, Consumer {
        if (it is GeneratedPortfolioResponse.GeneratedPortfolioScheme) {
              // code
        })

when I publish any event from adapter class it throws OnErrorNotImplementedException.

How can I handle this?

Pallavi Tapkir
  • 781
  • 7
  • 28

1 Answers1

0

It should be

   RxBus.subscribe(result ->  if (result is GeneratedPortfolioResponse.GeneratedPortfolioScheme) 
     {
          // code
     }, error -> yourshowErrorMethod(error))
sasikumar
  • 12,540
  • 3
  • 28
  • 48