code: public OtpErlangObject receive(final long timeout) throws OtpErlangExit,
              OtpErlangDecodeException {
          try {
              final OtpMsg m = receiveMsg(timeout);
              if (m != null) {
                  return m.getMsg();
              }
          } catch (final OtpErlangExit e) {
              throw e;
          } catch (final OtpErlangDecodeException f) {
              throw f;
          } catch (final InterruptedException g) {
          }
          return null;
      }
docs: Wait for a message to arrive for this mailbox.
  
  @param timeout
  the time, in milliseconds, to wait for a message before
  returning null.
  
  @return an {@link OtpErlangObject OtpErlangObject} representing the body
  of the next message waiting in this mailbox.
  
  @exception OtpErlangDecodeException
  if the message cannot be decoded.
  
  @exception OtpErlangExit
  if a linked {@link OtpErlangPid pid} has exited or has
  sent an exit signal to this mailbox.