public static Exception Retrieve()
{
Exception e = null;
if (numExceptionsPending > 0) {
if (pendingException != null) {
e = pendingException;
pendingException = null;
lock(typeof(BulletCollisionPINVOKE)) {
numExceptionsPending--;
}
}
}
return e;
}