-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nicer exception messages #303
Nicer exception messages #303
Conversation
…override toString() of Exceptions, instead use the message
Exception stack traces always had null for message. You should never …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@@ -518,4 +518,5 @@ class RxBleClientTest extends Specification { | |||
Thread.sleep(200) // Nasty :< | |||
true | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary formatting :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, I'll update in another commit.
@@ -7,15 +7,11 @@ | |||
private final UUID serviceUUID; | |||
|
|||
public BleServiceNotFoundException(UUID serviceUUID) { | |||
super("BLE Service not found with uuid " + serviceUUID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that uuid
should be used here with uppercase (I mean: UUID
instead of uuid
), as it is more frequent used version, you used it already in another class and it relates to used there class name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, I'll update in another commit.
switch (reason) { | ||
case BLUETOOTH_CANNOT_START: | ||
return "BLUETOOTH_CANNOT_START"; | ||
return "Bluetooth cannot start"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good piece of code. I like it :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me either. Good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the only thing I'd like to ask is to squash commits with a nice commit message :) Thanks!
Dear Contributor, similar to many open source projects we kindly request to sign our CLA if you'd like to contribute to our project. This license is for your protection as a Contributor as well as the protection of Polidea; it does not change your rights to use your own Contributions for any other purpose. You can find a link here: https://cla-assistant.io/Polidea/RxAndroidBle |
No description provided.