×

Discussion Board

Results 1 to 1 of 1

Threaded View

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    41

    About leaves on HTTP API.

    Hi.

    If a leave occurs In MHTTPTransactionCallback::MHFRunL, it will be handled in the MHFRunError. But, if I call aTransaction.Close() in the MHFRunL and if after that the code leaves, the leave does nothing. What happens to these leaves? For example:

    void CMyClass::MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent)
    {
    ...
    case THTTPEvent::ESucceeded:
    FunctionCall1L();
    aTransaction.Close();
    FunctionCall2L();
    ...
    }

    Now, if FunctionCall1L leaves, MHFRunError is called, but if FunctionCall2L leaves, absolutely nothing happens. What happens to this leave? What should I do here? Only thing that I've come up with, is to TRAP the FunctionCall2L and panic with the error code.

    Another related question: It says in the help that MHFRunL function is not allowed to leave if called with certain events. What are these event and does this have something to do with my problem?

    And one more question. I use the HTTP API the same way as in the HTTP client example. What is the difference between the member iTransaction and the one supplied with MHFRunL (the aTransaction). Because if I call aTransaction.Close() in the MHFRunL, the emulator won't recover from a connection error when I try to re-post something. If I call iTransaction.Close() emulator works fine in re-posting. Is it OK to call iTransaction.Close instead of aTransaction.Close()?

    Thanks.
    Last edited by kosjanne; 2005-04-15 at 09:10.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×