public static void Set(Exception e)
{
if (pendingException != null)
throw new ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e);
pendingException = e;
lock(typeof(BulletSoftBodyPINVOKE)) {
numExceptionsPending++;
}
}