windy0605 / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

Update PushNotificationManager.java to include cause when throwing certificate exceptions #179

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This makes debugging much easier.

InvalidCertificateChainException.java add the following:
public InvalidCertificateChainException(String message, Exception cause) {
        super("Invalid certificate chain (" + message + ")!  Verify that the keystore you provided was produced according to specs...", cause);
    }

PushNotificationManager.java update line 410:
if (e.toString().contains("certificate_unknown")) {
    throw new InvalidCertificateChainException(e.getMessage(), e);
}

Original issue reported on code.google.com by j...@jameslow.com on 24 Apr 2013 at 12:28

GoogleCodeExporter commented 9 years ago

Original comment by sype...@gmail.com on 8 May 2013 at 9:27

GoogleCodeExporter commented 9 years ago
Fixed in r393!

Original comment by sype...@gmail.com on 30 Sep 2014 at 4:16