Merge "Don't re-wrap DeviceIdAttestationExceptions"
This commit is contained in:
@@ -293,6 +293,11 @@ public abstract class AttestationUtils {
|
|||||||
} catch (SecurityException e) {
|
} catch (SecurityException e) {
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
// If a DeviceIdAttestationException was previously wrapped with some other type,
|
||||||
|
// let's throw the original exception instead of wrapping it yet again.
|
||||||
|
if (e.getCause() instanceof DeviceIdAttestationException) {
|
||||||
|
throw (DeviceIdAttestationException) e.getCause();
|
||||||
|
}
|
||||||
throw new DeviceIdAttestationException("Unable to perform attestation", e);
|
throw new DeviceIdAttestationException("Unable to perform attestation", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user