Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 08:26, 14 November 2007.

TSS000200 - Handling the leave when opening an HTTP session

From Forum Nokia Wiki

Subject Handling the leave when opening an HTTP session TSS000200
Platform(s) S60 2nd Edition
Category Symbian C++
Subcategory Networking, HTTP
Description RHTTPSession::OpenL leaves with KErrNotFound if the Internet AP is not correctly configured - this is probably the first problem anyone encounters when using the HTTP API on a device because OpenL works with most SDKs on the emulator with default AP configuration.

The solution is to TRAP the leave and instruct the user to configure the Internet AP.
// Open RHTTPSession with default protocol ("HTTP/TCP")
  TRAPD(err, iSession.OpenL());
  if(err != KErrNone)
  &nbsp;&nbsp;&nbsp;&nbsp; <nowiki>{</nowiki>
  &nbsp;&nbsp;&nbsp; // Most common error; no access point configured, and
  &nbsp;&nbsp;&nbsp; // session creation leaves with KErrNotFound.
  &nbsp;&nbsp;&nbsp; _LIT(KErrMsg, "Cannot create session. Is internet access point configured?");
  &nbsp;&nbsp;&nbsp; _LIT(KExitingApp, "Exiting app.");
  &nbsp;&nbsp;&nbsp; CEikonEnv::Static()-<nowiki>></nowiki>InfoWinL(KErrMsg, KExitingApp);
  &nbsp;&nbsp;&nbsp; User::Leave(err);
  &nbsp;&nbsp;&nbsp; <nowiki>}</nowiki>
Creation date April 7, 2005
Last modified -
Related Discussions
Thread Thread Starter Forum Replies Last Post
Error in Emulator: Feature Not Supported seacabo General Symbian C++ 3 2006-05-12 17:17
e32user - CBase 90 in Debug Christophe.A General Symbian C++ 12 2008-06-18 10:28
"Allow application to send request" ? Yes or no. sponnukumar Mobile Java Networking & Messaging & Security 4 2008-05-22 07:01
Why StreamConnection works but SocketConnection - not? NickKovach Mobile Java Networking & Messaging & Security 3 2006-12-21 03:23
Large object handling pshukla OMA DM/DS/CP 4 2008-06-30 10:42
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZmessagingQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZTechnicalSolutionQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX