TedBottomPicker icon indicating copy to clipboard operation
TedBottomPicker copied to clipboard

Improve error handling

Open JSpiner opened this issue 7 years ago • 8 comments

related with #81

  1. Add defaultErrorListener I created a default listener that only throws an OnErrorNotImplementedException if it is not set.

  2. Add error handling Added error handling at empty handling code.

JSpiner avatar Feb 19 '18 02:02 JSpiner

Do you want change policy forced to implement ErrorListener? As-is policy is setOnErrorListener() is optional

ParkSangGwon avatar Feb 19 '18 23:02 ParkSangGwon

@ParkSangGwon No! It does not force to implement ErrorListener. As we discussed,

Library단에서 OnErrorListener를 set()해주도록 제공해주고 만약 구현되어있다면 해당 listener에게 알려주고 그렇지 않다면 throw로 에러를 발생시키는 방식으로 하면 좋을것 같습니다.

If ErrorListener is implemented, just call it. If ErrorListener is not implemented and error occurs, it throws error by default listener.

JSpiner avatar Feb 20 '18 02:02 JSpiner

OnErrorNotImplementedException is thrown if an error has occurred and an ErrorListener has not been implemented.

JSpiner avatar Feb 20 '18 02:02 JSpiner

@JSpiner I forgot... Then please add setOnErrorListener() in sample code

ParkSangGwon avatar Feb 20 '18 02:02 ParkSangGwon

That's good. I'll add some sample code and push changes! Thanks.

JSpiner avatar Feb 20 '18 03:02 JSpiner

@JSpiner Please add sample code.

ParkSangGwon avatar May 24 '18 12:05 ParkSangGwon

@ParkSangGwon can you review it?

JSpiner avatar Dec 28 '18 01:12 JSpiner

@JSpiner Sorry, I can not remember this comment.

Library단에서 OnErrorListener를 set()해주도록 제공해주고 만약 구현되어있다면 해당 listener에게 알려주고 그렇지 않다면 throw로 에러를 발생시키는 방식으로 하면 좋을것 같습니다.

Please make optional setOnErrorListener(). This mean even If user didn't implement error listener, error don't occur

ParkSangGwon avatar Jan 02 '19 05:01 ParkSangGwon