if (state == State.STATE_COMMITTING)
{
// typically means no response from the remote end.
// throw a comm exception to distinguish this case from the
// one where the remote end itself threw a SystemException.
throw new SystemCommunicationException();
}
else
{
throw new WrongStateException() ;
}