Index: pjproject/trunk/pjsip-apps/src/samples/pjsua2_demo.cpp
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/pjsua2_demo.cpp	(revision 6025)
+++ pjproject/trunk/pjsip-apps/src/samples/pjsua2_demo.cpp	(revision 6026)
@@ -175,5 +175,5 @@
 
 
-static void mainProg1(Endpoint &ep) throw(Error)
+static void mainProg1(Endpoint &ep)
 {
     // Init library
@@ -198,5 +198,9 @@
                                                         "test1", 0, "test1") );
     MyAccount *acc(new MyAccount);
-    acc->create(acc_cfg);
+    try {
+	acc->create(acc_cfg);
+    } catch (...) {
+	std::cout << "Adding account failed" << std::endl;
+    }
     
     pj_thread_sleep(2000);
@@ -220,5 +224,5 @@
 }
 
-static void mainProg2() throw(Error)
+static void mainProg2()
 {
     string json_str;
@@ -266,5 +270,5 @@
 
 
-static void mainProg3(Endpoint &ep) throw(Error)
+static void mainProg3(Endpoint &ep)
 {
     const char *paths[] = { "../../../../tests/pjsua/wavs/input.16.wav",
@@ -325,5 +329,5 @@
 
 
-static void mainProg() throw(Error)
+static void mainProg()
 {
     string json_str;
@@ -377,5 +381,5 @@
 
 
-static void mainProg4(Endpoint &ep) throw(Error)
+static void mainProg4(Endpoint &ep)
 {
     // Init library
Index: pjproject/trunk/pjsip-apps/src/swig/java/android/app/src/main/java/org/pjsip/pjsua2/app/MyApp.java
===================================================================
--- pjproject/trunk/pjsip-apps/src/swig/java/android/app/src/main/java/org/pjsip/pjsua2/app/MyApp.java	(revision 6025)
+++ pjproject/trunk/pjsip-apps/src/swig/java/android/app/src/main/java/org/pjsip/pjsua2/app/MyApp.java	(revision 6026)
@@ -445,4 +445,5 @@
 	    acc.create(cfg);
 	} catch (Exception e) {
+	    System.out.println(e);
 	    acc = null;
 	    return null;
Index: pjproject/trunk/pjsip-apps/src/swig/pjsua2.i
===================================================================
--- pjproject/trunk/pjsip-apps/src/swig/pjsua2.i	(revision 6025)
+++ pjproject/trunk/pjsip-apps/src/swig/pjsua2.i	(revision 6026)
@@ -97,4 +97,12 @@
 %ignore toPj;
 
+// C++11 deprecated dynamic exception specification, but SWIG needs it.
+#ifndef SWIG
+#   define PJSUA2_THROW(x)
+#else
+#   define PJSUA2_THROW(x) throw(x)
+#endif
+
+
 //
 // Now include the API itself.
Index: pjproject/trunk/pjsip/include/pjsua2/account.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/account.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/account.hpp	(revision 6026)
@@ -175,5 +175,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -182,5 +182,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 
 };
@@ -274,5 +274,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -281,5 +281,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -332,5 +332,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -339,5 +339,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -399,5 +399,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -406,5 +406,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -439,5 +439,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -446,5 +446,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -693,5 +693,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -700,5 +700,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -782,5 +782,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -789,5 +789,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -885,5 +885,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -892,5 +892,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -972,5 +972,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -979,5 +979,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -1078,5 +1078,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -1085,5 +1085,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -1133,5 +1133,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -1140,5 +1140,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
     
 } AccountIpChangeConfig;
@@ -1235,5 +1235,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -1242,5 +1242,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -1643,5 +1643,5 @@
      */
     void create(const AccountConfig &cfg,
-                bool make_default=false) throw(Error);
+                bool make_default=false) PJSUA2_THROW(Error);
 
     /**
@@ -1668,5 +1668,5 @@
      * 				account.
      */
-    void modify(const AccountConfig &cfg) throw(Error);
+    void modify(const AccountConfig &cfg) PJSUA2_THROW(Error);
 
     /**
@@ -1681,5 +1681,5 @@
      * requests don't match any accounts.
      */
-    void setDefault() throw(Error);
+    void setDefault() PJSUA2_THROW(Error);
 
     /**
@@ -1713,5 +1713,5 @@
      * @return			Account info.
      */
-    AccountInfo getInfo() const throw(Error);
+    AccountInfo getInfo() const PJSUA2_THROW(Error);
 
     /**
@@ -1723,5 +1723,5 @@
      * 				process.
      */
-    void setRegistration(bool renew) throw(Error);
+    void setRegistration(bool renew) PJSUA2_THROW(Error);
 
     /**
@@ -1734,5 +1734,5 @@
      * @param pres_st		Presence online status.
      */
-    void setOnlineStatus(const PresenceStatus &pres_st) throw(Error);
+    void setOnlineStatus(const PresenceStatus &pres_st) PJSUA2_THROW(Error);
 
     /**
@@ -1750,5 +1750,5 @@
      * @param tp_id		The transport ID.
      */
-    void setTransport(TransportId tp_id) throw(Error);
+    void setTransport(TransportId tp_id) PJSUA2_THROW(Error);
 
     /**
@@ -1760,5 +1760,5 @@
      * @param prm		The sending NOTIFY parameter.
      */
-    void presNotify(const PresNotifyParam &prm) throw(Error);
+    void presNotify(const PresNotifyParam &prm) PJSUA2_THROW(Error);
     
     /**
@@ -1770,5 +1770,5 @@
      * @return			The buddy list.
      */
-    const BuddyVector& enumBuddies() const throw(Error);
+    const BuddyVector& enumBuddies() const PJSUA2_THROW(Error);
 
     /**
@@ -1777,5 +1777,5 @@
      * @return			The buddy list.
      */
-    BuddyVector2 enumBuddies2() const throw(Error);
+    BuddyVector2 enumBuddies2() const PJSUA2_THROW(Error);
 
     /**
@@ -1793,5 +1793,5 @@
      */
     Buddy* findBuddy(string uri, FindBuddyMatch *buddy_match = NULL) const
-		    throw(Error);
+		    PJSUA2_THROW(Error);
 
     /**
@@ -1804,5 +1804,5 @@
      * @return			The pointer to buddy.
      */
-    Buddy findBuddy2(string uri) const throw(Error);
+    Buddy findBuddy2(string uri) const PJSUA2_THROW(Error);
 
 public:
Index: pjproject/trunk/pjsip/include/pjsua2/call.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/call.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/call.hpp	(revision 6026)
@@ -1210,5 +1210,5 @@
      * @return              Call info.
      */
-    CallInfo getInfo() const throw(Error);
+    CallInfo getInfo() const PJSUA2_THROW(Error);
     
     /**
@@ -1264,5 +1264,5 @@
      * @return              The audio media.
      */
-    AudioMedia getAudioMedia(int med_idx) const throw(Error);
+    AudioMedia getAudioMedia(int med_idx) const PJSUA2_THROW(Error);
 
     /**
@@ -1277,5 +1277,5 @@
      * @return              The video media.
      */
-    VideoMedia getEncodingVideoMedia(int med_idx) const throw(Error);
+    VideoMedia getEncodingVideoMedia(int med_idx) const PJSUA2_THROW(Error);
 
     /**
@@ -1290,5 +1290,5 @@
      * @return              The video media.
      */
-    VideoMedia getDecodingVideoMedia(int med_idx) const throw(Error);
+    VideoMedia getDecodingVideoMedia(int med_idx) const PJSUA2_THROW(Error);
 
     /**
@@ -1349,5 +1349,5 @@
      * @see Endpoint::natGetType(), natTypeInSdp
      */
-    pj_stun_nat_type getRemNatType() throw(Error);
+    pj_stun_nat_type getRemNatType() PJSUA2_THROW(Error);
 
     /**
@@ -1360,5 +1360,6 @@
      *                      request.
      */
-    void makeCall(const string &dst_uri, const CallOpParam &prm) throw(Error);
+    void makeCall(const string &dst_uri, const CallOpParam &prm)
+		  PJSUA2_THROW(Error);
 
     /**
@@ -1384,5 +1385,5 @@
      *                      INVITE request.
      */
-    void answer(const CallOpParam &prm) throw(Error);
+    void answer(const CallOpParam &prm) PJSUA2_THROW(Error);
     
     /**
@@ -1404,5 +1405,5 @@
      *                      request/response message.
      */
-    void hangup(const CallOpParam &prm) throw(Error);
+    void hangup(const CallOpParam &prm) PJSUA2_THROW(Error);
     
     /**
@@ -1418,5 +1419,5 @@
      *                      the request.
      */
-    void setHold(const CallOpParam &prm) throw(Error);
+    void setHold(const CallOpParam &prm) PJSUA2_THROW(Error);
     
     /**
@@ -1433,5 +1434,5 @@
      *                      the request.
      */
-    void reinvite(const CallOpParam &prm) throw(Error);
+    void reinvite(const CallOpParam &prm) PJSUA2_THROW(Error);
     
     /**
@@ -1443,5 +1444,5 @@
      *                      the request.
      */
-    void update(const CallOpParam &prm) throw(Error);
+    void update(const CallOpParam &prm) PJSUA2_THROW(Error);
     
     /**
@@ -1460,5 +1461,5 @@
      *                      the request.
      */
-    void xfer(const string &dest, const CallOpParam &prm) throw(Error);
+    void xfer(const string &dest, const CallOpParam &prm) PJSUA2_THROW(Error);
 
     /**
@@ -1478,5 +1479,5 @@
      */
     void xferReplaces(const Call& dest_call,
-                      const CallOpParam &prm) throw(Error);
+                      const CallOpParam &prm) PJSUA2_THROW(Error);
     
     /**
@@ -1502,5 +1503,5 @@
      *                      not accepted here.
      */
-    void processRedirect(pjsip_redirect_op cmd) throw(Error);
+    void processRedirect(pjsip_redirect_op cmd) PJSUA2_THROW(Error);
 
     /**
@@ -1509,5 +1510,5 @@
      * @param digits        DTMF string digits to be sent.
      */
-    void dialDtmf(const string &digits) throw(Error);
+    void dialDtmf(const string &digits) PJSUA2_THROW(Error);
 
     /**
@@ -1516,5 +1517,5 @@
      * @param param	The send DTMF parameter.
      */
-    void sendDtmf(const CallSendDtmfParam &param) throw (Error);
+    void sendDtmf(const CallSendDtmfParam &param) PJSUA2_THROW(Error);
     
     /**
@@ -1530,5 +1531,6 @@
      *                      the IM callback is called.
      */
-    void sendInstantMessage(const SendInstantMessageParam& prm) throw(Error);
+    void sendInstantMessage(const SendInstantMessageParam& prm)
+			    PJSUA2_THROW(Error);
     
     /**
@@ -1541,5 +1543,5 @@
      */
     void sendTypingIndication(const SendTypingIndicationParam &prm)
-         throw(Error);
+         PJSUA2_THROW(Error);
     
     /**
@@ -1553,5 +1555,5 @@
      *                      included in outgoing request.
      */
-    void sendRequest(const CallSendRequestParam &prm) throw(Error);
+    void sendRequest(const CallSendRequestParam &prm) PJSUA2_THROW(Error);
     
     /**
@@ -1563,5 +1565,5 @@
      * @return              Call dump and media statistics string.
      */
-    string dump(bool with_media, const string indent) throw(Error);
+    string dump(bool with_media, const string indent) PJSUA2_THROW(Error);
     
     /**
@@ -1601,5 +1603,5 @@
      */
     void vidSetStream(pjsua_call_vid_strm_op op,
-                      const CallVidSetStreamParam &param) throw(Error);
+                      const CallVidSetStreamParam &param) PJSUA2_THROW(Error);
 
     /**
@@ -1610,5 +1612,5 @@
      * @return              The stream info.
      */
-    StreamInfo getStreamInfo(unsigned med_idx) const throw(Error);
+    StreamInfo getStreamInfo(unsigned med_idx) const PJSUA2_THROW(Error);
     
     /**
@@ -1619,5 +1621,5 @@
      * @return              The stream statistic.
      */
-    StreamStat getStreamStat(unsigned med_idx) const throw(Error);
+    StreamStat getStreamStat(unsigned med_idx) const PJSUA2_THROW(Error);
     
     /**
@@ -1628,5 +1630,6 @@
      * @return              The transport info.
      */
-    MediaTransportInfo getMedTransportInfo(unsigned med_idx) const throw(Error);
+    MediaTransportInfo getMedTransportInfo(unsigned med_idx) const
+					   PJSUA2_THROW(Error);
 
     /**
Index: pjproject/trunk/pjsip/include/pjsua2/config.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/config.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/config.hpp	(revision 6026)
@@ -48,4 +48,14 @@
 #endif
 
+
+/*
+ * C++11 deprecated dynamic exception specification, but SWIG needs it.
+ */
+#ifndef SWIG
+#   define PJSUA2_THROW(x)
+#else
+#   define PJSUA2_THROW(x) throw(x)
+#endif
+
 /**
  * @}  PJSUA2_CFG
Index: pjproject/trunk/pjsip/include/pjsua2/endpoint.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/endpoint.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/endpoint.hpp	(revision 6026)
@@ -574,5 +574,5 @@
      * @param node		Container to write values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -581,5 +581,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 
 };
@@ -674,5 +674,5 @@
      * @param node		Container to write values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -681,5 +681,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -893,5 +893,5 @@
      * @param node		Container to write values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -900,5 +900,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -923,5 +923,5 @@
      * @param node		Container to write values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -930,5 +930,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 
 };
@@ -955,5 +955,5 @@
 public:
     /** Retrieve the singleton instance of the endpoint */
-    static Endpoint &instance() throw(Error);
+    static Endpoint &instance() PJSUA2_THROW(Error);
 
     /** Default constructor */
@@ -979,5 +979,5 @@
      * application must call libDestroy() before quitting.
      */
-    void libCreate() throw(Error);
+    void libCreate() PJSUA2_THROW(Error);
 
     /**
@@ -997,5 +997,5 @@
      * @param prmEpConfig	Endpoint configurations
      */
-    void libInit( const EpConfig &prmEpConfig) throw(Error);
+    void libInit( const EpConfig &prmEpConfig) PJSUA2_THROW(Error);
 
     /**
@@ -1004,5 +1004,5 @@
      * function any time after init().
      */
-    void libStart() throw(Error);
+    void libStart() PJSUA2_THROW(Error);
 
     /**
@@ -1014,5 +1014,5 @@
      * @param name	The optional name to be assigned to the thread.
      */
-    void libRegisterThread(const string &name) throw(Error);
+    void libRegisterThread(const string &name) PJSUA2_THROW(Error);
 
     /**
@@ -1063,5 +1063,5 @@
      * @param prmFlags	Combination of pjsua_destroy_flag enumeration.
      */
-    void libDestroy(unsigned prmFlags=0) throw(Error);
+    void libDestroy(unsigned prmFlags=0) PJSUA2_THROW(Error);
 
 
@@ -1136,5 +1136,5 @@
      */
     Token utilTimerSchedule(unsigned prmMsecDelay,
-                            Token prmUserData) throw (Error);
+                            Token prmUserData) PJSUA2_THROW(Error);
 
     /**
@@ -1158,5 +1158,5 @@
      * Get cipher list supported by SSL/TLS backend.
      */
-    IntVector utilSslGetAvailableCiphers() throw (Error);
+    IntVector utilSslGetAvailableCiphers() PJSUA2_THROW(Error);
 
     /*************************************************************************
@@ -1175,5 +1175,5 @@
      * Note that STUN must be enabled to run this function successfully.
      */
-    void natDetectType(void) throw(Error);
+    void natDetectType(void) PJSUA2_THROW(Error);
 
     /**
@@ -1186,5 +1186,5 @@
      * PJ_EPENDING exception will be raised.
      */
-    pj_stun_nat_type natGetType() throw(Error);
+    pj_stun_nat_type natGetType() PJSUA2_THROW(Error);
 
     /**
@@ -1212,5 +1212,5 @@
      */
     void natUpdateStunServers(const StringVector &prmServers,
-                              bool prmWait) throw(Error);
+                              bool prmWait) PJSUA2_THROW(Error);
 
     /**
@@ -1242,5 +1242,5 @@
     void natCheckStunServers(const StringVector &prmServers,
                              bool prmWait,
-                             Token prmUserData) throw(Error);
+                             Token prmUserData) PJSUA2_THROW(Error);
 
     /**
@@ -1257,5 +1257,5 @@
      */
     void natCancelCheckStunServers(Token token,
-                                   bool notify_cb = false) throw(Error);
+                                   bool notify_cb = false) PJSUA2_THROW(Error);
 
     /*************************************************************************
@@ -1273,5 +1273,5 @@
      */
     TransportId transportCreate(pjsip_transport_type_e type,
-                                const TransportConfig &cfg) throw(Error);
+                                const TransportConfig &cfg) PJSUA2_THROW(Error);
 
     /**
@@ -1283,5 +1283,5 @@
      * @return			Array of transport IDs.
      */
-    IntVector transportEnum() throw(Error);
+    IntVector transportEnum() PJSUA2_THROW(Error);
 
     /**
@@ -1292,5 +1292,5 @@
      * @return			Transport info.
      */
-    TransportInfo transportGetInfo(TransportId id) throw(Error);
+    TransportInfo transportGetInfo(TransportId id) PJSUA2_THROW(Error);
 
     /**
@@ -1304,5 +1304,5 @@
      *
      */
-    void transportSetEnable(TransportId id, bool enabled) throw(Error);
+    void transportSetEnable(TransportId id, bool enabled) PJSUA2_THROW(Error);
 
     /**
@@ -1313,5 +1313,5 @@
      * @param id		Transport ID.
      */
-    void transportClose(TransportId id) throw(Error);
+    void transportClose(TransportId id) PJSUA2_THROW(Error);
     
     /**
@@ -1328,5 +1328,5 @@
      * @param tp		The transport.
      */
-    void transportShutdown(TransportHandle tp) throw(Error);
+    void transportShutdown(TransportHandle tp) PJSUA2_THROW(Error);
 
     /*************************************************************************
@@ -1389,5 +1389,5 @@
      * @return		The list of media port.
      */
-    const AudioMediaVector &mediaEnumPorts() const throw(Error);
+    const AudioMediaVector &mediaEnumPorts() const PJSUA2_THROW(Error);
 
     /**
@@ -1396,5 +1396,5 @@
      * @return		The list of audio media port.
      */
-    AudioMediaVector2 mediaEnumPorts2() const throw(Error);
+    AudioMediaVector2 mediaEnumPorts2() const PJSUA2_THROW(Error);
 
     /**
@@ -1403,5 +1403,5 @@
      * @return		The list of video media port.
      */
-    VideoMediaVector mediaEnumVidPorts() const throw(Error);
+    VideoMediaVector mediaEnumVidPorts() const PJSUA2_THROW(Error);
 
     /**
@@ -1431,5 +1431,5 @@
      * @return		Array of codec info.
      */
-    const CodecInfoVector &codecEnum() throw(Error);
+    const CodecInfoVector &codecEnum() PJSUA2_THROW(Error);
 
     /**
@@ -1438,5 +1438,5 @@
      * @return		Array of codec info.
      */
-    CodecInfoVector2 codecEnum2() const throw(Error);
+    CodecInfoVector2 codecEnum2() const PJSUA2_THROW(Error);
 
     /**
@@ -1450,5 +1450,5 @@
      */
     void codecSetPriority(const string &codec_id,
-			  pj_uint8_t priority) throw(Error);
+			  pj_uint8_t priority) PJSUA2_THROW(Error);
 
     /**
@@ -1461,5 +1461,5 @@
      *
      */
-    CodecParam codecGetParam(const string &codec_id) const throw(Error);
+    CodecParam codecGetParam(const string &codec_id) const PJSUA2_THROW(Error);
 
     /**
@@ -1472,5 +1472,5 @@
      */
     void codecSetParam(const string &codec_id,
-		       const CodecParam param) throw(Error);
+		       const CodecParam param) PJSUA2_THROW(Error);
 
     /**
@@ -1482,5 +1482,5 @@
      * @return		Array of video codec info.
      */
-    const CodecInfoVector &videoCodecEnum() throw(Error);
+    const CodecInfoVector &videoCodecEnum() PJSUA2_THROW(Error);
 
     /**
@@ -1489,5 +1489,5 @@
      * @return		Array of video codec info.
      */
-    CodecInfoVector2 videoCodecEnum2() const throw(Error);
+    CodecInfoVector2 videoCodecEnum2() const PJSUA2_THROW(Error);
 
     /**
@@ -1502,5 +1502,5 @@
      */
     void videoCodecSetPriority(const string &codec_id,
-			       pj_uint8_t priority) throw(Error);
+			       pj_uint8_t priority) PJSUA2_THROW(Error);
 
     /**
@@ -1513,5 +1513,6 @@
      *
      */
-    VidCodecParam getVideoCodecParam(const string &codec_id) const throw(Error);
+    VidCodecParam getVideoCodecParam(const string &codec_id) const
+				     PJSUA2_THROW(Error);
 
     /**
@@ -1523,5 +1524,5 @@
      */
     void setVideoCodecParam(const string &codec_id,
-			    const VidCodecParam &param) throw(Error);
+			    const VidCodecParam &param) PJSUA2_THROW(Error);
 			    
     /**
@@ -1531,5 +1532,5 @@
      *
      */
-    void resetVideoCodecParam(const string &codec_id) throw(Error);
+    void resetVideoCodecParam(const string &codec_id) PJSUA2_THROW(Error);
 
     /**
@@ -1538,5 +1539,5 @@
      * @return		The list of SRTP crypto-suite name.
      */
-    StringVector srtpCryptoEnum() throw(Error);
+    StringVector srtpCryptoEnum() PJSUA2_THROW(Error);
 
     /*************************************************************************
@@ -1563,5 +1564,5 @@
      * @return		PJ_SUCCESS on success, other on error.
      */
-    void handleIpChange(const IpChangeParam &param) throw(Error);
+    void handleIpChange(const IpChangeParam &param) PJSUA2_THROW(Error);
 
 public:
Index: pjproject/trunk/pjsip/include/pjsua2/json.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/json.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/json.hpp	(revision 6026)
@@ -59,5 +59,5 @@
      * @param filename		The file name.
      */
-    virtual void   loadFile(const string &filename) throw(Error);
+    virtual void   loadFile(const string &filename) PJSUA2_THROW(Error);
 
     /**
@@ -66,5 +66,5 @@
      * @param input		The string.
      */
-    virtual void   loadString(const string &input) throw(Error);
+    virtual void   loadString(const string &input) PJSUA2_THROW(Error);
 
     /**
@@ -73,10 +73,10 @@
      * @param filename		The file name.
      */
-    virtual void   saveFile(const string &filename) throw(Error);
+    virtual void   saveFile(const string &filename) PJSUA2_THROW(Error);
 
     /**
      * Write this document to string.
      */
-    virtual string saveString() throw(Error);
+    virtual string saveString() PJSUA2_THROW(Error);
 
     /**
Index: pjproject/trunk/pjsip/include/pjsua2/media.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/media.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/media.hpp	(revision 6026)
@@ -240,5 +240,5 @@
     * Get information about the specified conference port.
     */
-    ConfPortInfo getPortInfo() const throw(Error);
+    ConfPortInfo getPortInfo() const PJSUA2_THROW(Error);
 
     /**
@@ -250,5 +250,5 @@
      * Get information from specific port id.
      */
-    static ConfPortInfo getPortInfoFromId(int port_id) throw(Error);
+    static ConfPortInfo getPortInfoFromId(int port_id) PJSUA2_THROW(Error);
 
     /**
@@ -265,5 +265,5 @@
      * @param sink		The destination Media.
      */
-    void startTransmit(const AudioMedia &sink) const throw(Error);
+    void startTransmit(const AudioMedia &sink) const PJSUA2_THROW(Error);
 
     /**
@@ -294,5 +294,5 @@
     void startTransmit2(const AudioMedia &sink, 
 			const AudioMediaTransmitParam &param) const
-         throw(Error);
+         PJSUA2_THROW(Error);
 
     /**
@@ -302,5 +302,5 @@
      *
      */
-    void stopTransmit(const AudioMedia &sink) const throw(Error);
+    void stopTransmit(const AudioMedia &sink) const PJSUA2_THROW(Error);
 
     /**
@@ -312,5 +312,5 @@
      *				the port.
      */
-    void adjustRxLevel(float level) throw(Error);
+    void adjustRxLevel(float level) PJSUA2_THROW(Error);
 
     /**
@@ -322,5 +322,5 @@
      *				the port.
      */
-    void adjustTxLevel(float level) throw(Error);
+    void adjustTxLevel(float level) PJSUA2_THROW(Error);
 
     /**
@@ -329,5 +329,5 @@
      * @return			Signal level in percent.
      */
-    unsigned getRxLevel() const throw(Error);
+    unsigned getRxLevel() const PJSUA2_THROW(Error);
 
     /**
@@ -336,5 +336,5 @@
      * @return			Signal level in percent.
      */
-    unsigned getTxLevel() const throw(Error);
+    unsigned getTxLevel() const PJSUA2_THROW(Error);
 
     /**
@@ -382,5 +382,5 @@
      *
      */
-    void registerMediaPort(MediaPort port) throw(Error);
+    void registerMediaPort(MediaPort port) PJSUA2_THROW(Error);
 
     /**
@@ -393,5 +393,6 @@
      *
      */
-    void registerMediaPort2(MediaPort port, pj_pool_t *pool) throw(Error);
+    void registerMediaPort2(MediaPort port, pj_pool_t *pool)
+			    PJSUA2_THROW(Error);
 
     /**
@@ -470,5 +471,5 @@
      */
     void createPlayer(const string &file_name,
-		      unsigned options=0) throw(Error);
+		      unsigned options=0) PJSUA2_THROW(Error);
 
     /**
@@ -485,5 +486,5 @@
     void createPlaylist(const StringVector &file_names,
 			const string &label="",
-			unsigned options=0) throw(Error);
+			unsigned options=0) PJSUA2_THROW(Error);
 
     /**
@@ -493,5 +494,5 @@
      * @return		the info.
      */
-    AudioMediaPlayerInfo getInfo() const throw(Error);
+    AudioMediaPlayerInfo getInfo() const PJSUA2_THROW(Error);
 
     /**
@@ -501,5 +502,5 @@
      * @return		   Current playback position, in samples.
      */
-    pj_uint32_t getPos() const throw(Error);
+    pj_uint32_t getPos() const PJSUA2_THROW(Error);
 
     /**
@@ -509,5 +510,5 @@
      * @param samples	   The desired playback position, in samples.
      */
-    void setPos(pj_uint32_t samples) throw(Error);
+    void setPos(pj_uint32_t samples) PJSUA2_THROW(Error);
 
     /**
@@ -597,5 +598,5 @@
 			unsigned enc_type=0,
 			long max_size=0,
-			unsigned options=0) throw(Error);
+			unsigned options=0) PJSUA2_THROW(Error);
 
     /**
@@ -697,5 +698,5 @@
      */
     void createToneGenerator(unsigned clock_rate = 16000,
-			     unsigned channel_count = 1) throw(Error);
+			     unsigned channel_count = 1) PJSUA2_THROW(Error);
 
     /**
@@ -708,5 +709,5 @@
      * Instruct the tone generator to stop current processing.
      */
-    void stop() throw(Error);
+    void stop() PJSUA2_THROW(Error);
 
     /**
@@ -714,5 +715,5 @@
      * tone in the playback list.
      */
-    void rewind() throw(Error);
+    void rewind() PJSUA2_THROW(Error);
 
     /**
@@ -727,5 +728,5 @@
      */
     void play(const ToneDescVector &tones,
-              bool loop=false) throw(Error);
+              bool loop=false) PJSUA2_THROW(Error);
 
     /**
@@ -741,5 +742,5 @@
      */
     void playDigits(const ToneDigitVector &digits,
-                    bool loop=false) throw(Error);
+                    bool loop=false) PJSUA2_THROW(Error);
 
     /**
@@ -748,5 +749,5 @@
      * @return		    The digitmap currently used by the tone generator
      */
-    ToneDigitMapVector getDigitMap() const throw(Error);
+    ToneDigitMapVector getDigitMap() const PJSUA2_THROW(Error);
 
     /**
@@ -755,5 +756,5 @@
      * @param digit_map	    Digitmap to be used by the tone generator.
      */
-    void setDigitMap(const ToneDigitMapVector &digit_map) throw(Error);
+    void setDigitMap(const ToneDigitMapVector &digit_map) PJSUA2_THROW(Error);
 
 private:
@@ -852,5 +853,5 @@
      * @return 			Device ID of the capture device.
      */
-    int getCaptureDev() const throw(Error);
+    int getCaptureDev() const PJSUA2_THROW(Error);
 
     /**
@@ -859,5 +860,5 @@
      * @return			Audio media for the capture device.
      */
-    AudioMedia &getCaptureDevMedia() throw(Error);
+    AudioMedia &getCaptureDevMedia() PJSUA2_THROW(Error);
 
     /**
@@ -867,5 +868,5 @@
      * @return 			Device ID of the playback device.
      */
-    int getPlaybackDev() const throw(Error);
+    int getPlaybackDev() const PJSUA2_THROW(Error);
 
     /**
@@ -874,5 +875,5 @@
      * @return			Audio media for the speaker/playback device.
      */
-    AudioMedia &getPlaybackDevMedia() throw(Error);
+    AudioMedia &getPlaybackDevMedia() PJSUA2_THROW(Error);
 
     /**
@@ -884,5 +885,5 @@
      * @param capture_dev   	Device ID of the capture device.
      */
-    void setCaptureDev(int capture_dev) const throw(Error);
+    void setCaptureDev(int capture_dev) const PJSUA2_THROW(Error);
 
     /**
@@ -894,5 +895,5 @@
      * @param playback_dev   	Device ID of the playback device.
      */
-    void setPlaybackDev(int playback_dev) const throw(Error);
+    void setPlaybackDev(int playback_dev) const PJSUA2_THROW(Error);
 
     /**
@@ -905,5 +906,5 @@
      * @return			The list of audio device info.
      */
-    const AudioDevInfoVector &enumDev() throw(Error);
+    const AudioDevInfoVector &enumDev() PJSUA2_THROW(Error);
 
     /**
@@ -912,5 +913,5 @@
      * @return			The list of audio device info.
      */
-    AudioDevInfoVector2 enumDev2() const throw(Error);
+    AudioDevInfoVector2 enumDev2() const PJSUA2_THROW(Error);
 
     /**
@@ -920,5 +921,5 @@
      *
      */
-    void setNullDev() throw(Error);
+    void setNullDev() PJSUA2_THROW(Error);
 
     /**
@@ -939,5 +940,5 @@
      *
      */
-    void setSndDevMode(unsigned mode) const throw(Error);
+    void setSndDevMode(unsigned mode) const PJSUA2_THROW(Error);
 
     /**
@@ -965,5 +966,5 @@
      *
      */
-    void setEcOptions(unsigned tail_msec, unsigned options) throw(Error);
+    void setEcOptions(unsigned tail_msec, unsigned options) PJSUA2_THROW(Error);
 
     /**
@@ -973,5 +974,5 @@
      *				If AEC is disabled, the value will be zero.
      */
-    unsigned getEcTail() const throw(Error);
+    unsigned getEcTail() const PJSUA2_THROW(Error);
 
     /**
@@ -992,5 +993,5 @@
      *
      */
-    void refreshDevs() throw(Error);
+    void refreshDevs() PJSUA2_THROW(Error);
 
     /**
@@ -1011,5 +1012,5 @@
      * 				by this method once it returns successfully.
      */
-    AudioDevInfo getDevInfo(int id) const throw(Error);
+    AudioDevInfo getDevInfo(int id) const PJSUA2_THROW(Error);
 
     /**
@@ -1023,5 +1024,5 @@
      */
     int lookupDev(const string &drv_name,
-		  const string &dev_name) const throw(Error);
+		  const string &dev_name) const PJSUA2_THROW(Error);
 
     /**
@@ -1053,6 +1054,6 @@
      *
      */
-    void
-    setExtFormat(const MediaFormatAudio &format, bool keep=true) throw(Error);
+    void setExtFormat(const MediaFormatAudio &format, bool keep=true)
+		      PJSUA2_THROW(Error);
 
     /**
@@ -1071,5 +1072,5 @@
      *
      */
-    MediaFormatAudio getExtFormat() const throw(Error);
+    MediaFormatAudio getExtFormat() const PJSUA2_THROW(Error);
 
     /**
@@ -1092,5 +1093,5 @@
      */
     void
-    setInputLatency(unsigned latency_msec, bool keep=true) throw(Error);
+    setInputLatency(unsigned latency_msec, bool keep=true) PJSUA2_THROW(Error);
 
     /**
@@ -1109,5 +1110,5 @@
      *
      */
-    unsigned getInputLatency() const throw(Error);
+    unsigned getInputLatency() const PJSUA2_THROW(Error);
 
     /**
@@ -1131,5 +1132,5 @@
      */
     void
-    setOutputLatency(unsigned latency_msec, bool keep=true) throw(Error);
+    setOutputLatency(unsigned latency_msec, bool keep=true) PJSUA2_THROW(Error);
 
     /**
@@ -1148,5 +1149,5 @@
      *
      */
-    unsigned getOutputLatency() const throw(Error);
+    unsigned getOutputLatency() const PJSUA2_THROW(Error);
 
     /**
@@ -1170,5 +1171,5 @@
      *
      */
-    void setInputVolume(unsigned volume, bool keep=true) throw(Error);
+    void setInputVolume(unsigned volume, bool keep=true) PJSUA2_THROW(Error);
 
     /**
@@ -1187,5 +1188,5 @@
      *
      */
-    unsigned getInputVolume() const throw(Error);
+    unsigned getInputVolume() const PJSUA2_THROW(Error);
 
     /**
@@ -1208,5 +1209,5 @@
      *
      */
-    void setOutputVolume(unsigned volume, bool keep=true) throw(Error);
+    void setOutputVolume(unsigned volume, bool keep=true) PJSUA2_THROW(Error);
 
     /**
@@ -1225,5 +1226,5 @@
      *
      */
-    unsigned getOutputVolume() const throw(Error);
+    unsigned getOutputVolume() const PJSUA2_THROW(Error);
 
     /**
@@ -1242,5 +1243,5 @@
      *
      */
-    unsigned getInputSignal() const throw(Error);
+    unsigned getInputSignal() const PJSUA2_THROW(Error);
 
     /**
@@ -1259,5 +1260,5 @@
      *
      */
-    unsigned getOutputSignal() const throw(Error);
+    unsigned getOutputSignal() const PJSUA2_THROW(Error);
 
     /**
@@ -1280,6 +1281,6 @@
      *
      */
-    void
-    setInputRoute(pjmedia_aud_dev_route route, bool keep=true) throw(Error);
+    void setInputRoute(pjmedia_aud_dev_route route, bool keep=true)
+		       PJSUA2_THROW(Error);
 
     /**
@@ -1298,5 +1299,5 @@
      *
      */
-    pjmedia_aud_dev_route getInputRoute() const throw(Error);
+    pjmedia_aud_dev_route getInputRoute() const PJSUA2_THROW(Error);
 
     /**
@@ -1319,6 +1320,6 @@
      *
      */
-    void
-    setOutputRoute(pjmedia_aud_dev_route route, bool keep=true) throw(Error);
+    void setOutputRoute(pjmedia_aud_dev_route route, bool keep=true)
+			PJSUA2_THROW(Error);
 
     /**
@@ -1337,5 +1338,5 @@
      *
      */
-    pjmedia_aud_dev_route getOutputRoute() const throw(Error);
+    pjmedia_aud_dev_route getOutputRoute() const PJSUA2_THROW(Error);
 
     /**
@@ -1358,5 +1359,5 @@
      *
      */
-    void setVad(bool enable, bool keep=true) throw(Error);
+    void setVad(bool enable, bool keep=true) PJSUA2_THROW(Error);
 
     /**
@@ -1374,5 +1375,5 @@
      *
      */
-    bool getVad() const throw(Error);
+    bool getVad() const PJSUA2_THROW(Error);
 
     /**
@@ -1395,5 +1396,5 @@
      *
      */
-    void setCng(bool enable, bool keep=true) throw(Error);
+    void setCng(bool enable, bool keep=true) PJSUA2_THROW(Error);
 
     /**
@@ -1411,5 +1412,5 @@
      *
      */
-    bool getCng() const throw(Error);
+    bool getCng() const PJSUA2_THROW(Error);
 
     /**
@@ -1432,5 +1433,5 @@
      *
      */
-    void setPlc(bool enable, bool keep=true) throw(Error);
+    void setPlc(bool enable, bool keep=true) PJSUA2_THROW(Error);
 
     /**
@@ -1448,5 +1449,5 @@
      *
      */
-    bool getPlc() const throw(Error);
+    bool getPlc() const PJSUA2_THROW(Error);
 
 private:
@@ -1465,5 +1466,5 @@
 
     void clearAudioDevList();
-    int getActiveDev(bool is_capture) const throw(Error);
+    int getActiveDev(bool is_capture) const PJSUA2_THROW(Error);
 
     friend class Endpoint;
@@ -1608,5 +1609,5 @@
     * Get information about the specified conference port.
     */
-    VidConfPortInfo getPortInfo() const throw(Error);
+    VidConfPortInfo getPortInfo() const PJSUA2_THROW(Error);
 
     /**
@@ -1618,5 +1619,5 @@
      * Get information from specific port id.
      */
-    static VidConfPortInfo getPortInfoFromId(int port_id) throw(Error);
+    static VidConfPortInfo getPortInfoFromId(int port_id) PJSUA2_THROW(Error);
 
     /**
@@ -1636,5 +1637,5 @@
     void startTransmit(const VideoMedia &sink, 
 		       const VideoMediaTransmitParam &param) const
-         throw(Error);
+         PJSUA2_THROW(Error);
 
     /**
@@ -1644,5 +1645,5 @@
      *
      */
-    void stopTransmit(const VideoMedia &sink) const throw(Error);
+    void stopTransmit(const VideoMedia &sink) const PJSUA2_THROW(Error);
 
     /**
@@ -1675,5 +1676,5 @@
      * param pool  The memory pool.
      */
-    void registerMediaPort(MediaPort port, pj_pool_t *pool) throw(Error);
+    void registerMediaPort(MediaPort port, pj_pool_t *pool) PJSUA2_THROW(Error);
 
     /**
@@ -1770,5 +1771,5 @@
      * @return			video window info.
      */
-    VideoWindowInfo getInfo() const throw(Error);
+    VideoWindowInfo getInfo() const PJSUA2_THROW(Error);
 
     /**
@@ -1778,5 +1779,5 @@
      * @return			Video media of this renderer window.
      */
-    VideoMedia getVideoMedia() throw(Error);
+    VideoMedia getVideoMedia() PJSUA2_THROW(Error);
     
     /**
@@ -1789,5 +1790,5 @@
      *
      */
-    void Show(bool show) throw(Error);
+    void Show(bool show) PJSUA2_THROW(Error);
     
     /**
@@ -1799,5 +1800,5 @@
      *
      */
-    void setPos(const MediaCoordinate &pos) throw(Error);
+    void setPos(const MediaCoordinate &pos) PJSUA2_THROW(Error);
     
     /**
@@ -1809,5 +1810,5 @@
      *
      */
-    void setSize(const MediaSize &size) throw(Error);
+    void setSize(const MediaSize &size) PJSUA2_THROW(Error);
     
     /**
@@ -1822,5 +1823,5 @@
      *				negative value for counter-clockwise rotation.
      */
-    void rotate(int angle) throw(Error);
+    void rotate(int angle) PJSUA2_THROW(Error);
 
     /**
@@ -1832,5 +1833,5 @@
      * @param win		The new output window.
      */
-    void setWindow(const VideoWindowHandle &win) throw(Error);
+    void setWindow(const VideoWindowHandle &win) PJSUA2_THROW(Error);
     
 private:
@@ -1921,10 +1922,10 @@
      * @param p		Video preview parameters. 
      */
-    void start(const VideoPreviewOpParam &param) throw(Error);
+    void start(const VideoPreviewOpParam &param) PJSUA2_THROW(Error);
 
     /**
      * Stop video preview.
      */
-    void stop() throw(Error);
+    void stop() PJSUA2_THROW(Error);
 
     /*
@@ -1938,5 +1939,5 @@
      * @return			Video media of the video capture device.
      */
-    VideoMedia getVideoMedia() throw(Error);
+    VideoMedia getVideoMedia() PJSUA2_THROW(Error);
 
 private:
@@ -2029,5 +2030,5 @@
      * that accepts video device index as its parameter.
      */
-    void refreshDevs() throw(Error);
+    void refreshDevs() PJSUA2_THROW(Error);
 
     /**
@@ -2045,5 +2046,5 @@
      * @return		The list of video device info
      */
-    VideoDevInfo getDevInfo(int dev_id) const throw(Error);
+    VideoDevInfo getDevInfo(int dev_id) const PJSUA2_THROW(Error);
 
     /**
@@ -2055,5 +2056,5 @@
      * @return		The list of video device info
      */
-    const VideoDevInfoVector &enumDev() throw(Error);
+    const VideoDevInfoVector &enumDev() PJSUA2_THROW(Error);
 
     /**
@@ -2062,5 +2063,5 @@
      * @return		The list of video device info
      */
-    VideoDevInfoVector2 enumDev2() const throw(Error);
+    VideoDevInfoVector2 enumDev2() const PJSUA2_THROW(Error);
 
     /**
@@ -2074,5 +2075,5 @@
      */
     int lookupDev(const string &drv_name,
-		  const string &dev_name) const throw(Error);
+		  const string &dev_name) const PJSUA2_THROW(Error);
 
     /**
@@ -2106,5 +2107,5 @@
     void setFormat(int dev_id, 
 		   const MediaFormatVideo &format, 
-		   bool keep) throw(Error);
+		   bool keep) PJSUA2_THROW(Error);
 
     /**
@@ -2123,5 +2124,5 @@
      * @return keep	The video format.
      */
-    MediaFormatVideo getFormat(int dev_id) const throw(Error);
+    MediaFormatVideo getFormat(int dev_id) const PJSUA2_THROW(Error);
 
     /**
@@ -2146,5 +2147,5 @@
     void setInputScale(int dev_id, 
 		       const MediaSize &scale, 
-		       bool keep) throw(Error);
+		       bool keep) PJSUA2_THROW(Error);
 
     /**
@@ -2163,5 +2164,5 @@
      * @return keep	The video format.
      */
-    MediaSize getInputScale(int dev_id) const throw(Error);
+    MediaSize getInputScale(int dev_id) const PJSUA2_THROW(Error);
 
     /**
@@ -2184,5 +2185,6 @@
      * 			future use.
      */
-    void setOutputWindowFlags(int dev_id, int flags, bool keep) throw(Error);
+    void setOutputWindowFlags(int dev_id, int flags, bool keep)
+			      PJSUA2_THROW(Error);
     
     /**
@@ -2201,5 +2203,5 @@
      * @return keep	The video format.
      */
-    int getOutputWindowFlags(int dev_id) throw(Error);
+    int getOutputWindowFlags(int dev_id) PJSUA2_THROW(Error);
 
     /**
@@ -2217,5 +2219,5 @@
      */
     void switchDev(int dev_id,
-		   const VideoSwitchParam &param) throw(Error);
+		   const VideoSwitchParam &param) PJSUA2_THROW(Error);
 
     /**
@@ -2250,5 +2252,5 @@
     void setCaptureOrient(pjmedia_vid_dev_index dev_id,
     			  pjmedia_orient orient,
-    			  bool keep=true) throw(Error);
+    			  bool keep=true) PJSUA2_THROW(Error);
 
 private:
Index: pjproject/trunk/pjsip/include/pjsua2/persistent.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/persistent.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/persistent.hpp	(revision 6026)
@@ -69,5 +69,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error) = 0;
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error) = 0;
 
     /**
@@ -76,5 +76,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error) = 0;
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error) = 0;
 };
 
@@ -111,5 +111,6 @@
      * @param filename	The file name.
      */
-    virtual void   	loadFile(const string &filename) throw(Error) = 0;
+    virtual void   	loadFile(const string &filename)
+				 PJSUA2_THROW(Error) = 0;
 
     /**
@@ -118,5 +119,6 @@
      * @param input	The string.
      */
-    virtual void   	loadString(const string &input) throw(Error) = 0;
+    virtual void   	loadString(const string &input)
+				   PJSUA2_THROW(Error) = 0;
 
     /**
@@ -125,5 +127,6 @@
      * @param filename	The file name.
      */
-    virtual void   	saveFile(const string &filename) throw(Error) = 0;
+    virtual void   	saveFile(const string &filename)
+				 PJSUA2_THROW(Error) = 0;
 
     /**
@@ -132,5 +135,5 @@
      * @return		The string document.
      */
-    virtual string 	saveString() throw(Error) = 0;
+    virtual string 	saveString() PJSUA2_THROW(Error) = 0;
 
     /**
@@ -161,5 +164,5 @@
      * @return		The name of the next element .
      */
-    string		unreadName() const throw(Error);
+    string		unreadName() const PJSUA2_THROW(Error);
 
     /**
@@ -174,5 +177,6 @@
      * @return		The value.
      */
-    int			readInt(const string &name="") const throw(Error);
+    int			readInt(const string &name="") const
+				PJSUA2_THROW(Error);
 
     /**
@@ -187,5 +191,6 @@
      * @return		The value.
      */
-    float		readNumber(const string &name="") const throw(Error);
+    float		readNumber(const string &name="") const
+				   PJSUA2_THROW(Error);
 
     /**
@@ -200,5 +205,6 @@
      * @return		The value.
      */
-    bool		readBool(const string &name="") const throw(Error);
+    bool		readBool(const string &name="") const
+				 PJSUA2_THROW(Error);
 
     /**
@@ -213,5 +219,6 @@
      * @return		The value.
      */
-    string		readString(const string &name="") const throw(Error);
+    string		readString(const string &name="") const
+				   PJSUA2_THROW(Error);
 
     /**
@@ -227,5 +234,5 @@
      */
     StringVector	readStringVector(const string &name="") const
-					 throw(Error);
+					 PJSUA2_THROW(Error);
 
     /**
@@ -235,5 +242,6 @@
      * @param obj	The object to read.
      */
-    void		readObject(PersistentObject &obj) const throw(Error);
+    void		readObject(PersistentObject &obj) const
+				   PJSUA2_THROW(Error);
 
     /**
@@ -249,5 +257,5 @@
      */
     ContainerNode	readContainer(const string &name="") const
-				      throw(Error);
+				      PJSUA2_THROW(Error);
 
     /**
@@ -263,5 +271,5 @@
      */
     ContainerNode	readArray(const string &name="") const
-				  throw(Error);
+				  PJSUA2_THROW(Error);
 
     /**
@@ -272,5 +280,5 @@
      */
     void		writeNumber(const string &name,
-        		            float num) throw(Error);
+        		            float num) PJSUA2_THROW(Error);
 
     /**
@@ -281,5 +289,5 @@
      */
     void		writeInt(const string &name,
-        		         int num) throw(Error);
+        		         int num) PJSUA2_THROW(Error);
 
     /**
@@ -290,5 +298,5 @@
      */
     void		writeBool(const string &name,
-        		          bool value) throw(Error);
+        		          bool value) PJSUA2_THROW(Error);
 
     /**
@@ -299,5 +307,5 @@
      */
     void		writeString(const string &name,
-        		            const string &value) throw(Error);
+        		            const string &value) PJSUA2_THROW(Error);
 
     /**
@@ -309,5 +317,5 @@
     void		writeStringVector(const string &name,
         		                  const StringVector &arr)
-					  throw(Error);
+					  PJSUA2_THROW(Error);
 
     /**
@@ -317,5 +325,6 @@
      * @param obj	The object to be written
      */
-    void		writeObject(const PersistentObject &obj) throw(Error);
+    void		writeObject(const PersistentObject &obj)
+				    PJSUA2_THROW(Error);
 
     /**
@@ -328,5 +337,5 @@
      */
     ContainerNode 	writeNewContainer(const string &name)
-					  throw(Error);
+					  PJSUA2_THROW(Error);
 
     /**
@@ -339,5 +348,5 @@
      */
     ContainerNode 	writeNewArray(const string &name)
-				      throw(Error);
+				      PJSUA2_THROW(Error);
 };
 
@@ -423,5 +432,5 @@
      * Get the name of the next unread element.
      */
-    string		unreadName() const throw(Error);
+    string		unreadName() const PJSUA2_THROW(Error);
 
     /**
@@ -436,5 +445,6 @@
      * @return		The value.
      */
-    int			readInt(const string &name="") const throw(Error);
+    int			readInt(const string &name="") const
+				PJSUA2_THROW(Error);
 
     /**
@@ -449,5 +459,6 @@
      * @return		The value.
      */
-    float		readNumber(const string &name="") const throw(Error);
+    float		readNumber(const string &name="") const
+				   PJSUA2_THROW(Error);
 
     /**
@@ -462,5 +473,6 @@
      * @return		The value.
      */
-    bool		readBool(const string &name="") const throw(Error);
+    bool		readBool(const string &name="") const
+				 PJSUA2_THROW(Error);
 
     /**
@@ -475,5 +487,6 @@
      * @return		The value.
      */
-    string		readString(const string &name="") const throw(Error);
+    string		readString(const string &name="") const
+				   PJSUA2_THROW(Error);
 
     /**
@@ -489,5 +502,5 @@
      */
     StringVector	readStringVector(const string &name="") const
-					 throw(Error);
+					 PJSUA2_THROW(Error);
 
     /**
@@ -497,5 +510,6 @@
      * @param obj	The object to read.
      */
-    void		readObject(PersistentObject &obj) const throw(Error);
+    void		readObject(PersistentObject &obj) const
+				   PJSUA2_THROW(Error);
 
     /**
@@ -511,5 +525,5 @@
      */
     ContainerNode	readContainer(const string &name="") const
-				      throw(Error);
+				      PJSUA2_THROW(Error);
 
     /**
@@ -525,5 +539,5 @@
      */
     ContainerNode	readArray(const string &name="") const
-				  throw(Error);
+				  PJSUA2_THROW(Error);
 
     /**
@@ -534,5 +548,5 @@
      */
     void		writeNumber(const string &name,
-        		            float num) throw(Error);
+        		            float num) PJSUA2_THROW(Error);
 
     /**
@@ -543,5 +557,5 @@
      */
     void		writeInt(const string &name,
-        		         int num) throw(Error);
+        		         int num) PJSUA2_THROW(Error);
 
     /**
@@ -552,5 +566,5 @@
      */
     void		writeBool(const string &name,
-        		          bool value) throw(Error);
+        		          bool value) PJSUA2_THROW(Error);
 
     /**
@@ -561,5 +575,5 @@
      */
     void		writeString(const string &name,
-        		            const string &value) throw(Error);
+        		            const string &value) PJSUA2_THROW(Error);
 
     /**
@@ -571,5 +585,5 @@
     void		writeStringVector(const string &name,
         		                  const StringVector &arr)
-					  throw(Error);
+					  PJSUA2_THROW(Error);
 
     /**
@@ -579,5 +593,6 @@
      * @param obj	The object to be written
      */
-    void		writeObject(const PersistentObject &obj) throw(Error);
+    void		writeObject(const PersistentObject &obj)
+				    PJSUA2_THROW(Error);
 
     /**
@@ -590,5 +605,5 @@
      */
     ContainerNode 	writeNewContainer(const string &name)
-					  throw(Error);
+					  PJSUA2_THROW(Error);
 
     /**
@@ -601,5 +616,5 @@
      */
     ContainerNode 	writeNewArray(const string &name)
-				      throw(Error);
+				      PJSUA2_THROW(Error);
 
 public:
@@ -619,45 +634,45 @@
     bool		(*hasUnread)(const ContainerNode*);
     string		(*unreadName)(const ContainerNode*)
-				      throw(Error);
+				      PJSUA2_THROW(Error);
     float		(*readNumber)(const ContainerNode*,
 				      const string&)
-				      throw(Error);
+				      PJSUA2_THROW(Error);
     bool		(*readBool)(const ContainerNode*,
 				    const string&)
-				    throw(Error);
+				    PJSUA2_THROW(Error);
     string		(*readString)(const ContainerNode*,
 				      const string&)
-				      throw(Error);
+				      PJSUA2_THROW(Error);
     StringVector	(*readStringVector)(const ContainerNode*,
 					    const string&)
-					    throw(Error);
+					    PJSUA2_THROW(Error);
     ContainerNode	(*readContainer)(const ContainerNode*,
 					 const string &)
-					 throw(Error);
+					 PJSUA2_THROW(Error);
     ContainerNode	(*readArray)(const ContainerNode*,
 				     const string &)
-				     throw(Error);
+				     PJSUA2_THROW(Error);
     void		(*writeNumber)(ContainerNode*,
 				       const string &name,
         		               float num)
-        		               throw(Error);
+        		               PJSUA2_THROW(Error);
     void		(*writeBool)(ContainerNode*,
 				     const string &name,
         			     bool value)
-        			     throw(Error);
+        			     PJSUA2_THROW(Error);
     void		(*writeString)(ContainerNode*,
 				       const string &name,
         			       const string &value)
-        			       throw(Error);
+        			       PJSUA2_THROW(Error);
     void		(*writeStringVector)(ContainerNode*,
 					     const string &name,
         				     const StringVector &value)
-					     throw(Error);
+					     PJSUA2_THROW(Error);
     ContainerNode 	(*writeNewContainer)(ContainerNode*,
 					     const string &name)
-					     throw(Error);
+					     PJSUA2_THROW(Error);
     ContainerNode 	(*writeNewArray)(ContainerNode*,
 				         const string &name)
-					 throw(Error);
+					 PJSUA2_THROW(Error);
 };
 
Index: pjproject/trunk/pjsip/include/pjsua2/presence.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/presence.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/presence.hpp	(revision 6026)
@@ -101,5 +101,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -108,5 +108,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -233,5 +233,5 @@
      * @param cfg		The buddy config.
      */
-    void create(Account &acc, const BuddyConfig &cfg) throw(Error);
+    void create(Account &acc, const BuddyConfig &cfg) PJSUA2_THROW(Error);
     
     /**
@@ -247,5 +247,5 @@
      * @return			Buddy info.
      */
-    BuddyInfo getInfo() const throw(Error);
+    BuddyInfo getInfo() const PJSUA2_THROW(Error);
 
     /**
@@ -257,5 +257,5 @@
      *				subscription.
      */
-    void subscribePresence(bool subscribe) throw(Error);
+    void subscribePresence(bool subscribe) PJSUA2_THROW(Error);
     
     /**
@@ -275,5 +275,5 @@
      * \a onBuddyState() callback.
      */
-     void updatePresence(void) throw(Error);
+     void updatePresence(void) PJSUA2_THROW(Error);
      
     /**
@@ -283,5 +283,6 @@
      * @param prm	Sending instant message parameter.
      */
-    void sendInstantMessage(const SendInstantMessageParam &prm) throw(Error);
+    void sendInstantMessage(const SendInstantMessageParam &prm)
+			    PJSUA2_THROW(Error);
 
     /**
@@ -291,5 +292,5 @@
      */
     void sendTypingIndication(const SendTypingIndicationParam &prm)
-	 throw(Error);
+	 PJSUA2_THROW(Error);
 
 public:
Index: pjproject/trunk/pjsip/include/pjsua2/siptypes.hpp
===================================================================
--- pjproject/trunk/pjsip/include/pjsua2/siptypes.hpp	(revision 6025)
+++ pjproject/trunk/pjsip/include/pjsua2/siptypes.hpp	(revision 6026)
@@ -105,5 +105,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -112,5 +112,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -288,5 +288,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -295,5 +295,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -385,5 +385,5 @@
      * @param node		Container to read values from.
      */
-    virtual void readObject(const ContainerNode &node) throw(Error);
+    virtual void readObject(const ContainerNode &node) PJSUA2_THROW(Error);
 
     /**
@@ -392,5 +392,5 @@
      * @param node		Container to write values to.
      */
-    virtual void writeObject(ContainerNode &node) const throw(Error);
+    virtual void writeObject(ContainerNode &node) const PJSUA2_THROW(Error);
 };
 
@@ -745,5 +745,5 @@
      * Initiaize from PJSIP header.
      */
-    void fromPj(const pjsip_hdr *) throw(Error);
+    void fromPj(const pjsip_hdr *) PJSUA2_THROW(Error);
 
     /**
@@ -785,5 +785,5 @@
      * Initiaize from PJSIP's pjsip_multipart_part.
      */
-    void fromPj(const pjsip_multipart_part &prm) throw(Error);
+    void fromPj(const pjsip_multipart_part &prm) PJSUA2_THROW(Error);
 
     /**
@@ -860,5 +860,5 @@
      * Initiaize from PJSUA's pjsua_msg_data.
      */
-    void fromPj(const pjsua_msg_data &prm) throw(Error);
+    void fromPj(const pjsua_msg_data &prm) PJSUA2_THROW(Error);
 
     /**
@@ -933,18 +933,18 @@
 void readIntVector( ContainerNode &node,
                     const string &array_name,
-                    IntVector &v) throw(Error);
+                    IntVector &v) PJSUA2_THROW(Error);
 void writeIntVector(ContainerNode &node,
                     const string &array_name,
-                    const IntVector &v) throw(Error);
+                    const IntVector &v) PJSUA2_THROW(Error);
 void readQosParams( ContainerNode &node,
-                    pj_qos_params &qos) throw(Error);
+                    pj_qos_params &qos) PJSUA2_THROW(Error);
 void writeQosParams( ContainerNode &node,
-                     const pj_qos_params &qos) throw(Error);
+                     const pj_qos_params &qos) PJSUA2_THROW(Error);
 void readSipHeaders( const ContainerNode &node,
                      const string &array_name,
-                     SipHeaderVector &headers) throw(Error);
+                     SipHeaderVector &headers) PJSUA2_THROW(Error);
 void writeSipHeaders(ContainerNode &node,
                      const string &array_name,
-                     const SipHeaderVector &headers) throw(Error);
+                     const SipHeaderVector &headers) PJSUA2_THROW(Error);
 //! @endcond
 #endif // SWIG
Index: pjproject/trunk/pjsip/src/pjsua2/account.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/account.cpp	(revision 6025)
+++ pjproject/trunk/pjsip/src/pjsua2/account.cpp	(revision 6026)
@@ -85,5 +85,5 @@
 }
 
-void RtcpFbConfig::readObject(const ContainerNode &node) throw(Error)
+void RtcpFbConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("RtcpFbConfig");
@@ -102,5 +102,5 @@
 }
 
-void RtcpFbConfig::writeObject(ContainerNode &node) const throw(Error)
+void RtcpFbConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("RtcpFbConfig");
@@ -180,5 +180,5 @@
 }
 
-void SrtpOpt::readObject(const ContainerNode &node) throw(Error)
+void SrtpOpt::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("SrtpOpt");
@@ -203,5 +203,5 @@
 }
 
-void SrtpOpt::writeObject(ContainerNode &node) const throw(Error)
+void SrtpOpt::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("SrtpOpt");
@@ -222,5 +222,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountRegConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountRegConfig::readObject(const ContainerNode &node)
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountRegConfig");
@@ -241,5 +242,6 @@
 }
 
-void AccountRegConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountRegConfig::writeObject(ContainerNode &node) const
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountRegConfig");
@@ -262,5 +264,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountSipConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountSipConfig::readObject(const ContainerNode &node)
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountSipConfig");
@@ -283,5 +286,6 @@
 }
 
-void AccountSipConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountSipConfig::writeObject(ContainerNode &node) const
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountSipConfig");
@@ -303,5 +307,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountCallConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountCallConfig::readObject(const ContainerNode &node)
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountCallConfig");
@@ -314,5 +319,6 @@
 }
 
-void AccountCallConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountCallConfig::writeObject(ContainerNode &node) const
+				    PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountCallConfig");
@@ -327,5 +333,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountPresConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountPresConfig::readObject(const ContainerNode &node)
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountPresConfig");
@@ -339,5 +346,6 @@
 }
 
-void AccountPresConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountPresConfig::writeObject(ContainerNode &node) const
+				    PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountPresConfig");
@@ -353,5 +361,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountMwiConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountMwiConfig::readObject(const ContainerNode &node)
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountMwiConfig");
@@ -361,5 +370,6 @@
 }
 
-void AccountMwiConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountMwiConfig::writeObject(ContainerNode &node) const
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountMwiConfig");
@@ -371,5 +381,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountNatConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountNatConfig::readObject(const ContainerNode &node)
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountNatConfig");
@@ -403,5 +414,6 @@
 }
 
-void AccountNatConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountNatConfig::writeObject(ContainerNode &node) const
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountNatConfig");
@@ -437,5 +449,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountMediaConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountMediaConfig::readObject(const ContainerNode &node)
+				    PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountMediaConfig");
@@ -451,5 +464,6 @@
 }
 
-void AccountMediaConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountMediaConfig::writeObject(ContainerNode &node) const
+				     PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountMediaConfig");
@@ -467,5 +481,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountVideoConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountVideoConfig::readObject(const ContainerNode &node)
+				    PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountVideoConfig");
@@ -474,7 +489,10 @@
     NODE_READ_BOOL    ( this_node, autoTransmitOutgoing);
     NODE_READ_UNSIGNED( this_node, windowFlags);
-    NODE_READ_NUM_T   ( this_node, pjmedia_vid_dev_index, defaultCaptureDevice);
-    NODE_READ_NUM_T   ( this_node, pjmedia_vid_dev_index, defaultRenderDevice);
-    NODE_READ_NUM_T   ( this_node, pjmedia_vid_stream_rc_method, rateControlMethod);
+    NODE_READ_NUM_T   ( this_node, pjmedia_vid_dev_index,
+			defaultCaptureDevice);
+    NODE_READ_NUM_T   ( this_node, pjmedia_vid_dev_index,
+			defaultRenderDevice);
+    NODE_READ_NUM_T   ( this_node, pjmedia_vid_stream_rc_method,
+			rateControlMethod);
     NODE_READ_UNSIGNED( this_node, rateControlBandwidth);
     NODE_READ_UNSIGNED( this_node, startKeyframeCount);
@@ -482,5 +500,6 @@
 }
 
-void AccountVideoConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountVideoConfig::writeObject(ContainerNode &node) const
+				     PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountVideoConfig");
@@ -489,7 +508,10 @@
     NODE_WRITE_BOOL    ( this_node, autoTransmitOutgoing);
     NODE_WRITE_UNSIGNED( this_node, windowFlags);
-    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_dev_index, defaultCaptureDevice);
-    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_dev_index, defaultRenderDevice);
-    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_stream_rc_method, rateControlMethod);
+    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_dev_index,
+			 defaultCaptureDevice);
+    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_dev_index,
+			 defaultRenderDevice);
+    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_stream_rc_method,
+			 rateControlMethod);
     NODE_WRITE_UNSIGNED( this_node, rateControlBandwidth);
     NODE_WRITE_UNSIGNED( this_node, startKeyframeCount);
@@ -498,5 +520,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountIpChangeConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountIpChangeConfig::readObject(const ContainerNode &node)
+				       PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountIpChangeConfig");
@@ -507,5 +530,6 @@
 }
 
-void AccountIpChangeConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountIpChangeConfig::writeObject(ContainerNode &node) const
+					PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountIpChangeConfig");
@@ -614,6 +638,8 @@
     ret.ice_cfg.ice_max_host_cands = natConfig.iceMaxHostCands;
     ret.ice_cfg.ice_opt.aggressive = natConfig.iceAggressiveNomination;
-    ret.ice_cfg.ice_opt.nominated_check_delay = natConfig.iceNominatedCheckDelayMsec;
-    ret.ice_cfg.ice_opt.controlled_agent_want_nom_timeout = natConfig.iceWaitNominationTimeoutMsec;
+    ret.ice_cfg.ice_opt.nominated_check_delay =
+			    natConfig.iceNominatedCheckDelayMsec;
+    ret.ice_cfg.ice_opt.controlled_agent_want_nom_timeout =
+			    natConfig.iceWaitNominationTimeoutMsec;
     ret.ice_cfg.ice_no_rtcp	= natConfig.iceNoRtcp;
     ret.ice_cfg.ice_always_update = natConfig.iceAlwaysUpdate;
@@ -624,7 +650,10 @@
     ret.turn_cfg.turn_conn_type	= natConfig.turnConnType;
     ret.turn_cfg.turn_auth_cred.type = PJ_STUN_AUTH_CRED_STATIC;
-    ret.turn_cfg.turn_auth_cred.data.static_cred.username = str2Pj(natConfig.turnUserName);
-    ret.turn_cfg.turn_auth_cred.data.static_cred.data_type = (pj_stun_passwd_type)natConfig.turnPasswordType;
-    ret.turn_cfg.turn_auth_cred.data.static_cred.data = str2Pj(natConfig.turnPassword);
+    ret.turn_cfg.turn_auth_cred.data.static_cred.username =
+			    str2Pj(natConfig.turnUserName);
+    ret.turn_cfg.turn_auth_cred.data.static_cred.data_type =
+			    (pj_stun_passwd_type)natConfig.turnPasswordType;
+    ret.turn_cfg.turn_auth_cred.data.static_cred.data =
+			    str2Pj(natConfig.turnPassword);
     ret.turn_cfg.turn_auth_cred.data.static_cred.realm = pj_str((char*)"");
     ret.turn_cfg.turn_auth_cred.data.static_cred.nonce = pj_str((char*)"");
@@ -765,7 +794,10 @@
 	natConfig.iceEnabled = PJ2BOOL(prm.ice_cfg.enable_ice);
 	natConfig.iceMaxHostCands = prm.ice_cfg.ice_max_host_cands;
-	natConfig.iceAggressiveNomination = PJ2BOOL(prm.ice_cfg.ice_opt.aggressive);
-	natConfig.iceNominatedCheckDelayMsec = prm.ice_cfg.ice_opt.nominated_check_delay;
-	natConfig.iceWaitNominationTimeoutMsec = prm.ice_cfg.ice_opt.controlled_agent_want_nom_timeout;
+	natConfig.iceAggressiveNomination =
+			PJ2BOOL(prm.ice_cfg.ice_opt.aggressive);
+	natConfig.iceNominatedCheckDelayMsec =
+			prm.ice_cfg.ice_opt.nominated_check_delay;
+	natConfig.iceWaitNominationTimeoutMsec =
+			prm.ice_cfg.ice_opt.controlled_agent_want_nom_timeout;
 	natConfig.iceNoRtcp	= PJ2BOOL(prm.ice_cfg.ice_no_rtcp);
 	natConfig.iceAlwaysUpdate = PJ2BOOL(prm.ice_cfg.ice_always_update);
@@ -779,6 +811,8 @@
 	natConfig.iceMaxHostCands= mcfg->ice_max_host_cands;
 	natConfig.iceAggressiveNomination = PJ2BOOL(mcfg->ice_opt.aggressive);
-	natConfig.iceNominatedCheckDelayMsec = mcfg->ice_opt.nominated_check_delay;
-	natConfig.iceWaitNominationTimeoutMsec = mcfg->ice_opt.controlled_agent_want_nom_timeout;
+	natConfig.iceNominatedCheckDelayMsec =
+			mcfg->ice_opt.nominated_check_delay;
+	natConfig.iceWaitNominationTimeoutMsec =
+			mcfg->ice_opt.controlled_agent_want_nom_timeout;
 	natConfig.iceNoRtcp	= PJ2BOOL(mcfg->ice_no_rtcp);
 	natConfig.iceAlwaysUpdate = PJ2BOOL(mcfg->ice_always_update);
@@ -789,7 +823,10 @@
 	natConfig.turnServer	= pj2Str(prm.turn_cfg.turn_server);
 	natConfig.turnConnType	= prm.turn_cfg.turn_conn_type;
-	natConfig.turnUserName	= pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.username);
-	natConfig.turnPasswordType = prm.turn_cfg.turn_auth_cred.data.static_cred.data_type;
-	natConfig.turnPassword	= pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.data);
+	natConfig.turnUserName	=
+		pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.username);
+	natConfig.turnPasswordType =
+		prm.turn_cfg.turn_auth_cred.data.static_cred.data_type;
+	natConfig.turnPassword	=
+		pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.data);
     } else {
 	pjsua_media_config default_mcfg;
@@ -801,7 +838,10 @@
 	natConfig.turnServer	= pj2Str(mcfg->turn_server);
 	natConfig.turnConnType	= mcfg->turn_conn_type;
-	natConfig.turnUserName	= pj2Str(mcfg->turn_auth_cred.data.static_cred.username);
-	natConfig.turnPasswordType = mcfg->turn_auth_cred.data.static_cred.data_type;
-	natConfig.turnPassword	= pj2Str(mcfg->turn_auth_cred.data.static_cred.data);
+	natConfig.turnUserName	=
+		pj2Str(mcfg->turn_auth_cred.data.static_cred.username);
+	natConfig.turnPasswordType =
+		mcfg->turn_auth_cred.data.static_cred.data_type;
+	natConfig.turnPassword	=
+		pj2Str(mcfg->turn_auth_cred.data.static_cred.data);
     }
     natConfig.contactRewriteUse	= prm.allow_contact_rewrite;
@@ -848,5 +888,5 @@
 }
 
-void AccountConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountConfig");
@@ -864,5 +904,5 @@
 }
 
-void AccountConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountConfig");
@@ -915,5 +955,5 @@
 
 void Account::create(const AccountConfig &acc_cfg,
-                     bool make_default) throw(Error)
+                     bool make_default) PJSUA2_THROW(Error)
 {
     pjsua_acc_config pj_acc_cfg;
@@ -941,5 +981,5 @@
 }
 
-void Account::modify(const AccountConfig &acc_cfg) throw(Error)
+void Account::modify(const AccountConfig &acc_cfg) PJSUA2_THROW(Error)
 {
     pjsua_acc_config pj_acc_cfg;
@@ -955,5 +995,5 @@
 }
 
-void Account::setDefault() throw(Error)
+void Account::setDefault() PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_acc_set_default(id) );
@@ -975,5 +1015,5 @@
 }
 
-AccountInfo Account::getInfo() const throw(Error)
+AccountInfo Account::getInfo() const PJSUA2_THROW(Error)
 {
     pjsua_acc_info pj_ai;
@@ -985,5 +1025,5 @@
 }
 
-void Account::setRegistration(bool renew) throw(Error)
+void Account::setRegistration(bool renew) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_acc_set_registration(id, renew) );
@@ -991,5 +1031,5 @@
 
 void
-Account::setOnlineStatus(const PresenceStatus &pres_st) throw(Error)
+Account::setOnlineStatus(const PresenceStatus &pres_st) PJSUA2_THROW(Error)
 {
     pjrpid_element pj_rpid;
@@ -1006,10 +1046,10 @@
 }
 
-void Account::setTransport(TransportId tp_id) throw(Error)
+void Account::setTransport(TransportId tp_id) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_acc_set_transport(id, tp_id) );
 }
 
-void Account::presNotify(const PresNotifyParam &prm) throw(Error)
+void Account::presNotify(const PresNotifyParam &prm) PJSUA2_THROW(Error)
 {
     pj_str_t pj_state_str   = str2Pj(prm.stateStr);
@@ -1024,10 +1064,10 @@
 }
 
-const BuddyVector& Account::enumBuddies() const throw(Error)
+const BuddyVector& Account::enumBuddies() const PJSUA2_THROW(Error)
 {
     return buddyList;
 }
 
-BuddyVector2 Account::enumBuddies2() const throw(Error)
+BuddyVector2 Account::enumBuddies2() const PJSUA2_THROW(Error)
 {
     BuddyVector2 bv2;
@@ -1044,5 +1084,5 @@
 
 Buddy* Account::findBuddy(string uri, FindBuddyMatch *buddy_match) const
-		throw(Error)
+		PJSUA2_THROW(Error)
 {
     if (!buddy_match) {
@@ -1058,5 +1098,5 @@
 }
 
-Buddy Account::findBuddy2(string uri) const throw(Error)
+Buddy Account::findBuddy2(string uri) const PJSUA2_THROW(Error)
 {
     pj_str_t pj_uri;
Index: pjproject/trunk/pjsip/src/pjsua2/call.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/call.cpp	(revision 6025)
+++ pjproject/trunk/pjsip/src/pjsua2/call.cpp	(revision 6026)
@@ -445,5 +445,5 @@
 }
 
-CallInfo Call::getInfo() const throw(Error)
+CallInfo Call::getInfo() const PJSUA2_THROW(Error)
 {
     pjsua_call_info pj_ci;
@@ -500,5 +500,5 @@
 }
 
-AudioMedia Call::getAudioMedia(int med_idx) const throw(Error)
+AudioMedia Call::getAudioMedia(int med_idx) const PJSUA2_THROW(Error)
 {
     pjsua_call_info pj_ci;
@@ -538,5 +538,5 @@
 }
 
-VideoMedia Call::getEncodingVideoMedia(int med_idx) const throw(Error)
+VideoMedia Call::getEncodingVideoMedia(int med_idx) const PJSUA2_THROW(Error)
 {
     pjsua_call_info pj_ci;
@@ -576,5 +576,5 @@
 }
 
-VideoMedia Call::getDecodingVideoMedia(int med_idx) const throw(Error)
+VideoMedia Call::getDecodingVideoMedia(int med_idx) const PJSUA2_THROW(Error)
 {
     pjsua_call_info pj_ci;
@@ -636,5 +636,5 @@
 }
 
-pj_stun_nat_type Call::getRemNatType() throw(Error)
+pj_stun_nat_type Call::getRemNatType() PJSUA2_THROW(Error)
 {
     pj_stun_nat_type nat;
@@ -645,5 +645,6 @@
 }
 
-void Call::makeCall(const string &dst_uri, const CallOpParam &prm) throw(Error)
+void Call::makeCall(const string &dst_uri, const CallOpParam &prm)
+		    PJSUA2_THROW(Error)
 {
     pj_str_t pj_dst_uri = str2Pj(dst_uri);
@@ -655,5 +656,5 @@
 }
 
-void Call::answer(const CallOpParam &prm) throw(Error)
+void Call::answer(const CallOpParam &prm) PJSUA2_THROW(Error)
 {
     call_param param(prm.txOption, prm.opt, prm.reason,
@@ -661,5 +662,6 @@
     
     if (param.sdp) {
-    	PJSUA2_CHECK_EXPR( pjsua_call_answer_with_sdp(id, param.sdp, param.p_opt,
+    	PJSUA2_CHECK_EXPR( pjsua_call_answer_with_sdp(id, param.sdp,
+						      param.p_opt,
     						      prm.statusCode,
                                               	      param.p_reason,
@@ -672,5 +674,5 @@
 }
 
-void Call::hangup(const CallOpParam &prm) throw(Error)
+void Call::hangup(const CallOpParam &prm) PJSUA2_THROW(Error)
 {
     call_param param(prm.txOption, prm.opt, prm.reason);
@@ -680,26 +682,30 @@
 }
 
-void Call::setHold(const CallOpParam &prm) throw(Error)
+void Call::setHold(const CallOpParam &prm) PJSUA2_THROW(Error)
 {
     call_param param(prm.txOption, prm.opt, prm.reason);
     
-    PJSUA2_CHECK_EXPR( pjsua_call_set_hold2(id, prm.options, param.p_msg_data));
-}
-
-void Call::reinvite(const CallOpParam &prm) throw(Error)
+    PJSUA2_CHECK_EXPR( pjsua_call_set_hold2(id, prm.options,
+					    param.p_msg_data) );
+}
+
+void Call::reinvite(const CallOpParam &prm) PJSUA2_THROW(Error)
 {
     call_param param(prm.txOption, prm.opt, prm.reason);
 
-    PJSUA2_CHECK_EXPR( pjsua_call_reinvite2(id, param.p_opt, param.p_msg_data));
-}
-
-void Call::update(const CallOpParam &prm) throw(Error)
+    PJSUA2_CHECK_EXPR( pjsua_call_reinvite2(id, param.p_opt,
+					    param.p_msg_data) );
+}
+
+void Call::update(const CallOpParam &prm) PJSUA2_THROW(Error)
 {
     call_param param(prm.txOption, prm.opt, prm.reason);
     
-    PJSUA2_CHECK_EXPR( pjsua_call_update2(id, param.p_opt, param.p_msg_data) );
-}
-
-void Call::xfer(const string &dest, const CallOpParam &prm) throw(Error)
+    PJSUA2_CHECK_EXPR( pjsua_call_update2(id, param.p_opt,
+					  param.p_msg_data) );
+}
+
+void Call::xfer(const string &dest, const CallOpParam &prm)
+		PJSUA2_THROW(Error)
 {
     call_param param(prm.txOption);
@@ -710,18 +716,19 @@
 
 void Call::xferReplaces(const Call& dest_call,
-                  const CallOpParam &prm) throw(Error)
+                  const CallOpParam &prm) PJSUA2_THROW(Error)
 {
     call_param param(prm.txOption);
     
     PJSUA2_CHECK_EXPR(pjsua_call_xfer_replaces(id, dest_call.getId(),
-                                               prm.options, param.p_msg_data) );
-}
-
-void Call::processRedirect(pjsip_redirect_op cmd) throw(Error)
+                                               prm.options,
+					       param.p_msg_data) );
+}
+
+void Call::processRedirect(pjsip_redirect_op cmd) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR(pjsua_call_process_redirect(id, cmd));
 }
 
-void Call::dialDtmf(const string &digits) throw(Error)
+void Call::dialDtmf(const string &digits) PJSUA2_THROW(Error)
 {
     pj_str_t pj_digits = str2Pj(digits);
@@ -730,5 +737,5 @@
 }
 
-void Call::sendDtmf(const CallSendDtmfParam &param) throw (Error)
+void Call::sendDtmf(const CallSendDtmfParam &param) PJSUA2_THROW(Error)
 {
     pjsua_call_send_dtmf_param pj_param = param.toPj();
@@ -739,5 +746,5 @@
 
 void Call::sendInstantMessage(const SendInstantMessageParam& prm)
-    throw(Error)
+    PJSUA2_THROW(Error)
 {
     pj_str_t mime_type = str2Pj(prm.contentType);
@@ -750,5 +757,5 @@
 
 void Call::sendTypingIndication(const SendTypingIndicationParam &prm)
-    throw(Error)
+    PJSUA2_THROW(Error)
 {
     call_param param(prm.txOption);
@@ -760,13 +767,14 @@
 }
 
-void Call::sendRequest(const CallSendRequestParam &prm) throw(Error)
+void Call::sendRequest(const CallSendRequestParam &prm) PJSUA2_THROW(Error)
 {
     pj_str_t method = str2Pj(prm.method);
     call_param param(prm.txOption);
     
-    PJSUA2_CHECK_EXPR(pjsua_call_send_request(id, &method, param.p_msg_data) );
-}
-
-string Call::dump(bool with_media, const string indent) throw(Error)
+    PJSUA2_CHECK_EXPR(pjsua_call_send_request(id, &method,
+					      param.p_msg_data) );
+}
+
+string Call::dump(bool with_media, const string indent) PJSUA2_THROW(Error)
 {
 #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
@@ -804,5 +812,6 @@
 
 void Call::vidSetStream(pjsua_call_vid_strm_op op,
-                        const CallVidSetStreamParam &param) throw(Error)
+                        const CallVidSetStreamParam &param)
+			PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -820,5 +829,5 @@
 }
 
-StreamInfo Call::getStreamInfo(unsigned med_idx) const throw(Error)
+StreamInfo Call::getStreamInfo(unsigned med_idx) const PJSUA2_THROW(Error)
 {
     pjsua_stream_info pj_si;
@@ -830,5 +839,5 @@
 }
 
-StreamStat Call::getStreamStat(unsigned med_idx) const throw(Error)
+StreamStat Call::getStreamStat(unsigned med_idx) const PJSUA2_THROW(Error)
 {
     pjsua_stream_stat pj_ss;
@@ -841,5 +850,5 @@
 
 MediaTransportInfo Call::getMedTransportInfo(unsigned med_idx) const
-    throw(Error)
+    PJSUA2_THROW(Error)
 {
     pjmedia_transport_info pj_mti;
Index: pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp	(revision 6025)
+++ pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp	(revision 6026)
@@ -224,5 +224,5 @@
 }
 
-void UaConfig::readObject(const ContainerNode &node) throw(Error)
+void UaConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("UaConfig");
@@ -240,5 +240,5 @@
 }
 
-void UaConfig::writeObject(ContainerNode &node) const throw(Error)
+void UaConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("UaConfig");
@@ -293,5 +293,5 @@
 }
 
-void LogConfig::readObject(const ContainerNode &node) throw(Error)
+void LogConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("LogConfig");
@@ -305,5 +305,5 @@
 }
 
-void LogConfig::writeObject(ContainerNode &node) const throw(Error)
+void LogConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("LogConfig");
@@ -387,5 +387,5 @@
 }
 
-void MediaConfig::readObject(const ContainerNode &node) throw(Error)
+void MediaConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("MediaConfig");
@@ -416,5 +416,5 @@
 }
 
-void MediaConfig::writeObject(ContainerNode &node) const throw(Error)
+void MediaConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("MediaConfig");
@@ -447,5 +447,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void EpConfig::readObject(const ContainerNode &node) throw(Error)
+void EpConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("EpConfig");
@@ -455,5 +455,5 @@
 }
 
-void EpConfig::writeObject(ContainerNode &node) const throw(Error)
+void EpConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("EpConfig");
@@ -490,5 +490,5 @@
 }
 
-Endpoint& Endpoint::instance() throw(Error)
+Endpoint& Endpoint::instance() PJSUA2_THROW(Error)
 {
     if (!instance_) {
@@ -1617,5 +1617,5 @@
 }
 
-void Endpoint::libCreate() throw(Error)
+void Endpoint::libCreate() PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_create() );
@@ -1631,5 +1631,5 @@
 }
 
-void Endpoint::libInit(const EpConfig &prmEpConfig) throw(Error)
+void Endpoint::libInit(const EpConfig &prmEpConfig) PJSUA2_THROW(Error)
 {
     pjsua_config ua_cfg;
@@ -1718,10 +1718,10 @@
 }
 
-void Endpoint::libStart() throw(Error)
+void Endpoint::libStart() PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR(pjsua_start());
 }
 
-void Endpoint::libRegisterThread(const string &name) throw(Error)
+void Endpoint::libRegisterThread(const string &name) PJSUA2_THROW(Error)
 {
     pj_thread_t *thread;
@@ -1774,5 +1774,5 @@
 }
 
-void Endpoint::libDestroy(unsigned flags) throw(Error)
+void Endpoint::libDestroy(unsigned flags) PJSUA2_THROW(Error)
 {
     pj_status_t status;
@@ -1856,5 +1856,5 @@
 
 Token Endpoint::utilTimerSchedule(unsigned prmMsecDelay,
-                                  Token prmUserData) throw (Error)
+                                  Token prmUserData) PJSUA2_THROW(Error)
 {
     UserTimer *ut;
@@ -1898,5 +1898,5 @@
 }
 
-IntVector Endpoint::utilSslGetAvailableCiphers() throw (Error)
+IntVector Endpoint::utilSslGetAvailableCiphers() PJSUA2_THROW(Error)
 {
 #if PJ_HAS_SSL_SOCK
@@ -1916,10 +1916,10 @@
  * Endpoint NAT operations
  */
-void Endpoint::natDetectType(void) throw(Error)
+void Endpoint::natDetectType(void) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_detect_nat_type() );
 }
 
-pj_stun_nat_type Endpoint::natGetType() throw(Error)
+pj_stun_nat_type Endpoint::natGetType() PJSUA2_THROW(Error)
 {
     pj_stun_nat_type type;
@@ -1931,5 +1931,5 @@
 
 void Endpoint::natUpdateStunServers(const StringVector &servers,
-				    bool wait) throw(Error)
+				    bool wait) PJSUA2_THROW(Error)
 {
     pj_str_t srv[MAX_STUN_SERVERS];
@@ -1947,5 +1947,5 @@
 void Endpoint::natCheckStunServers(const StringVector &servers,
 				   bool wait,
-				   Token token) throw(Error)
+				   Token token) PJSUA2_THROW(Error)
 {
     pj_str_t srv[MAX_STUN_SERVERS];
@@ -1963,5 +1963,5 @@
 
 void Endpoint::natCancelCheckStunServers(Token token,
-                                         bool notify_cb) throw(Error)
+                                         bool notify_cb) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_cancel_stun_resolution(token, notify_cb) );
@@ -1973,5 +1973,6 @@
  */
 TransportId Endpoint::transportCreate(pjsip_transport_type_e type,
-                                      const TransportConfig &cfg) throw(Error)
+                                      const TransportConfig &cfg)
+				      PJSUA2_THROW(Error)
 {
     pjsua_transport_config tcfg;
@@ -1985,5 +1986,5 @@
 }
 
-IntVector Endpoint::transportEnum() throw(Error)
+IntVector Endpoint::transportEnum() PJSUA2_THROW(Error)
 {
     pjsua_transport_id tids[32];
@@ -1995,5 +1996,5 @@
 }
 
-TransportInfo Endpoint::transportGetInfo(TransportId id) throw(Error)
+TransportInfo Endpoint::transportGetInfo(TransportId id) PJSUA2_THROW(Error)
 {
     pjsua_transport_info pj_tinfo;
@@ -2006,15 +2007,16 @@
 }
 
-void Endpoint::transportSetEnable(TransportId id, bool enabled) throw(Error)
+void Endpoint::transportSetEnable(TransportId id, bool enabled)
+				  PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_transport_set_enable(id, enabled) );
 }
 
-void Endpoint::transportClose(TransportId id) throw(Error)
+void Endpoint::transportClose(TransportId id) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_transport_close(id, PJ_FALSE) );
 }
 
-void Endpoint::transportShutdown(TransportHandle tp) throw(Error)
+void Endpoint::transportShutdown(TransportHandle tp) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsip_transport_shutdown((pjsip_transport *)tp) );
@@ -2045,10 +2047,10 @@
 }
 
-const AudioMediaVector &Endpoint::mediaEnumPorts() const throw(Error)
+const AudioMediaVector &Endpoint::mediaEnumPorts() const PJSUA2_THROW(Error)
 {
     return mediaList;
 }
 
-AudioMediaVector2 Endpoint::mediaEnumPorts2() const throw(Error)
+AudioMediaVector2 Endpoint::mediaEnumPorts2() const PJSUA2_THROW(Error)
 {
     AudioMediaVector2 amv2;
@@ -2066,5 +2068,5 @@
 }
 
-VideoMediaVector Endpoint::mediaEnumVidPorts() const throw(Error)
+VideoMediaVector Endpoint::mediaEnumVidPorts() const PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -2140,5 +2142,5 @@
  * Codec operations.
  */
-const CodecInfoVector &Endpoint::codecEnum() throw(Error)
+const CodecInfoVector &Endpoint::codecEnum() PJSUA2_THROW(Error)
 {
     pjsua_codec_info pj_codec[MAX_CODEC_NUM];
@@ -2151,5 +2153,5 @@
 }
 
-CodecInfoVector2 Endpoint::codecEnum2() const throw(Error)
+CodecInfoVector2 Endpoint::codecEnum2() const PJSUA2_THROW(Error)
 {
     CodecInfoVector2 civ2;
@@ -2167,5 +2169,5 @@
 
 void Endpoint::codecSetPriority(const string &codec_id,
-			        pj_uint8_t priority) throw(Error)
+			        pj_uint8_t priority) PJSUA2_THROW(Error)
 {
     pj_str_t codec_str = str2Pj(codec_id);
@@ -2173,5 +2175,6 @@
 }
 
-CodecParam Endpoint::codecGetParam(const string &codec_id) const throw(Error)
+CodecParam Endpoint::codecGetParam(const string &codec_id) const
+				   PJSUA2_THROW(Error)
 {
     CodecParam param;
@@ -2186,5 +2189,5 @@
 
 void Endpoint::codecSetParam(const string &codec_id,
-			     const CodecParam param) throw(Error)
+			     const CodecParam param) PJSUA2_THROW(Error)
 {
     pj_str_t codec_str = str2Pj(codec_id);
@@ -2202,5 +2205,6 @@
 }
 
-void Endpoint::updateCodecInfoList(pjsua_codec_info pj_codec[], unsigned count,
+void Endpoint::updateCodecInfoList(pjsua_codec_info pj_codec[],
+				   unsigned count,
 				   CodecInfoVector &codec_list)
 {
@@ -2216,5 +2220,5 @@
 }
 
-const CodecInfoVector &Endpoint::videoCodecEnum() throw(Error)
+const CodecInfoVector &Endpoint::videoCodecEnum() PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -2229,5 +2233,5 @@
 }
 
-CodecInfoVector2 Endpoint::videoCodecEnum2() const throw(Error)
+CodecInfoVector2 Endpoint::videoCodecEnum2() const PJSUA2_THROW(Error)
 {
     CodecInfoVector2 civ2;
@@ -2247,5 +2251,5 @@
 
 void Endpoint::videoCodecSetPriority(const string &codec_id,
-				     pj_uint8_t priority) throw(Error)
+				     pj_uint8_t priority) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -2259,5 +2263,5 @@
 
 VidCodecParam Endpoint::getVideoCodecParam(const string &codec_id) const 
-								   throw(Error)
+					   PJSUA2_THROW(Error)
 {    
     VidCodecParam codec_param;
@@ -2275,5 +2279,6 @@
 
 void Endpoint::setVideoCodecParam(const string &codec_id,
-				  const VidCodecParam &param) throw(Error)
+				  const VidCodecParam &param)
+				  PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -2288,5 +2293,6 @@
 }
 
-void Endpoint::resetVideoCodecParam(const string &codec_id) throw(Error)
+void Endpoint::resetVideoCodecParam(const string &codec_id)
+				    PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -2302,5 +2308,5 @@
  * Enumerate all SRTP crypto-suite names.
  */
-StringVector Endpoint::srtpCryptoEnum() throw(Error)
+StringVector Endpoint::srtpCryptoEnum() PJSUA2_THROW(Error)
 {
     StringVector result;
@@ -2318,5 +2324,5 @@
 }
 
-void Endpoint::handleIpChange(const IpChangeParam &param) throw(Error)
+void Endpoint::handleIpChange(const IpChangeParam &param) PJSUA2_THROW(Error)
 {
     pjsua_ip_change_param ip_change_param = param.toPj();
Index: pjproject/trunk/pjsip/src/pjsua2/json.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/json.cpp	(revision 6025)
+++ pjproject/trunk/pjsip/src/pjsua2/json.cpp	(revision 6026)
@@ -30,45 +30,45 @@
 static bool		jsonNode_hasUnread(const ContainerNode*);
 static string		jsonNode_unreadName(const ContainerNode*n)
-				            throw(Error);
+				            PJSUA2_THROW(Error);
 static float		jsonNode_readNumber(const ContainerNode*,
             		                    const string&)
-					      throw(Error);
+					      PJSUA2_THROW(Error);
 static bool		jsonNode_readBool(const ContainerNode*,
            		                  const string&)
-					  throw(Error);
+					  PJSUA2_THROW(Error);
 static string		jsonNode_readString(const ContainerNode*,
              		                    const string&)
-					    throw(Error);
+					    PJSUA2_THROW(Error);
 static StringVector	jsonNode_readStringVector(const ContainerNode*,
                    	                          const string&)
-						  throw(Error);
+						  PJSUA2_THROW(Error);
 static ContainerNode	jsonNode_readContainer(const ContainerNode*,
                     	                       const string &)
-					       throw(Error);
+					       PJSUA2_THROW(Error);
 static ContainerNode	jsonNode_readArray(const ContainerNode*,
                     	                   const string &)
-					   throw(Error);
+					   PJSUA2_THROW(Error);
 static void		jsonNode_writeNumber(ContainerNode*,
            		                     const string &name,
            		                     float num)
-           		                     throw(Error);
+           		                     PJSUA2_THROW(Error);
 static void		jsonNode_writeBool(ContainerNode*,
            		                   const string &name,
            		                   bool value)
-					   throw(Error);
+					   PJSUA2_THROW(Error);
 static void		jsonNode_writeString(ContainerNode*,
            		                     const string &name,
            		                     const string &value)
-					     throw(Error);
+					     PJSUA2_THROW(Error);
 static void		jsonNode_writeStringVector(ContainerNode*,
            		                           const string &name,
            		                           const StringVector &value)
-					           throw(Error);
+					           PJSUA2_THROW(Error);
 static ContainerNode 	jsonNode_writeNewContainer(ContainerNode*,
                      	                           const string &name)
-					           throw(Error);
+					           PJSUA2_THROW(Error);
 static ContainerNode 	jsonNode_writeNewArray(ContainerNode*,
                      	                       const string &name)
-					       throw(Error);
+					       PJSUA2_THROW(Error);
 
 static container_node_op json_op =
@@ -115,5 +115,5 @@
 }
 
-void JsonDocument::loadFile(const string &filename) throw(Error)
+void JsonDocument::loadFile(const string &filename) PJSUA2_THROW(Error)
 {
     if (root)
@@ -175,5 +175,5 @@
 }
 
-void JsonDocument::loadString(const string &input) throw(Error)
+void JsonDocument::loadString(const string &input) PJSUA2_THROW(Error)
 {
     if (root)
@@ -215,5 +215,5 @@
 }
 
-void JsonDocument::saveFile(const string &filename) throw(Error)
+void JsonDocument::saveFile(const string &filename) PJSUA2_THROW(Error)
 {
     struct save_file_data sd;
@@ -248,5 +248,5 @@
 }
 
-string JsonDocument::saveString() throw(Error)
+string JsonDocument::saveString() PJSUA2_THROW(Error)
 {
     struct save_string_data sd;
@@ -334,5 +334,5 @@
 
 static string jsonNode_unreadName(const ContainerNode *node)
-				  throw(Error)
+				  PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -343,5 +343,5 @@
 static float jsonNode_readNumber(const ContainerNode *node,
             		         const string &name)
-				 throw(Error)
+				 PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -353,5 +353,5 @@
 static bool jsonNode_readBool(const ContainerNode *node,
 			      const string &name)
-			      throw(Error)
+			      PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -363,5 +363,5 @@
 static string jsonNode_readString(const ContainerNode *node,
 				  const string &name)
-				  throw(Error)
+				  PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -373,5 +373,5 @@
 static StringVector jsonNode_readStringVector(const ContainerNode *node,
                    	                      const string &name)
-					      throw(Error)
+					      PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -399,5 +399,5 @@
 static ContainerNode jsonNode_readContainer(const ContainerNode *node,
                     	                    const string &name)
-					    throw(Error)
+					    PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -417,5 +417,5 @@
 static ContainerNode jsonNode_readArray(const ContainerNode *node,
                     	                const string &name)
-					throw(Error)
+					PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -443,5 +443,5 @@
            		         const string &name,
            		         float num)
-           		         throw(Error)
+           		         PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -455,5 +455,5 @@
            		       const string &name,
            		       bool value)
-			       throw(Error)
+			       PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -467,5 +467,5 @@
            		         const string &name,
            		         const string &value)
-				 throw(Error)
+				 PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -482,5 +482,5 @@
            		               const string &name,
            		               const StringVector &value)
-				       throw(Error)
+				       PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -503,5 +503,5 @@
 static ContainerNode jsonNode_writeNewContainer(ContainerNode *node,
                      	                        const string &name)
-					        throw(Error)
+					        PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
@@ -524,5 +524,5 @@
 static ContainerNode jsonNode_writeNewArray(ContainerNode *node,
                      	                    const string &name)
-					    throw(Error)
+					    PJSUA2_THROW(Error)
 {
     json_node_data *jdat = (json_node_data*)&node->data;
Index: pjproject/trunk/pjsip/src/pjsua2/media.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/media.cpp	(revision 6025)
+++ pjproject/trunk/pjsip/src/pjsua2/media.cpp	(revision 6026)
@@ -129,5 +129,5 @@
 }
 
-void AudioMedia::registerMediaPort(MediaPort port) throw(Error)
+void AudioMedia::registerMediaPort(MediaPort port) PJSUA2_THROW(Error)
 {
     /* Check if media already added to Conf bridge. */
@@ -157,5 +157,5 @@
 
 void AudioMedia::registerMediaPort2(MediaPort port, pj_pool_t *pool)
-     throw(Error)
+     PJSUA2_THROW(Error)
 {
     /* Check if media already added to Conf bridge. */
@@ -194,5 +194,5 @@
 }
 
-ConfPortInfo AudioMedia::getPortInfo() const throw(Error)
+ConfPortInfo AudioMedia::getPortInfo() const PJSUA2_THROW(Error)
 {
     return AudioMedia::getPortInfoFromId(id);
@@ -204,5 +204,5 @@
 }
 
-ConfPortInfo AudioMedia::getPortInfoFromId(int port_id) throw(Error)
+ConfPortInfo AudioMedia::getPortInfoFromId(int port_id) PJSUA2_THROW(Error)
 {
     pjsua_conf_port_info pj_info;
@@ -214,5 +214,5 @@
 }
 
-void AudioMedia::startTransmit(const AudioMedia &sink) const throw(Error)
+void AudioMedia::startTransmit(const AudioMedia &sink) const PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_conf_connect(id, sink.id) );
@@ -221,5 +221,5 @@
 void AudioMedia::startTransmit2(const AudioMedia &sink,
 				const AudioMediaTransmitParam &param) const
-     throw(Error)
+     PJSUA2_THROW(Error)
 {
     pjsua_conf_connect_param pj_param;
@@ -230,20 +230,20 @@
 }
 
-void AudioMedia::stopTransmit(const AudioMedia &sink) const throw(Error)
+void AudioMedia::stopTransmit(const AudioMedia &sink) const PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_conf_disconnect(id, sink.id) );
 }
 
-void AudioMedia::adjustRxLevel(float level) throw(Error)
+void AudioMedia::adjustRxLevel(float level) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_conf_adjust_tx_level(id, level) );
 }
 
-void AudioMedia::adjustTxLevel(float level) throw(Error)
+void AudioMedia::adjustTxLevel(float level) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_conf_adjust_rx_level(id, level) );
 }
 
-unsigned AudioMedia::getRxLevel() const throw(Error)
+unsigned AudioMedia::getRxLevel() const PJSUA2_THROW(Error)
 {
     unsigned level;
@@ -252,5 +252,5 @@
 }
 
-unsigned AudioMedia::getTxLevel() const throw(Error)
+unsigned AudioMedia::getTxLevel() const PJSUA2_THROW(Error)
 {
     unsigned level;
@@ -282,5 +282,5 @@
 void AudioMediaPlayer::createPlayer(const string &file_name,
 				    unsigned options)
-				    throw(Error)
+				    PJSUA2_THROW(Error)
 {
     if (playerId != PJSUA_INVALID_ID) {
@@ -318,5 +318,5 @@
 				      const string &label,
 				      unsigned options)
-				      throw(Error)
+				      PJSUA2_THROW(Error)
 {
     if (playerId != PJSUA_INVALID_ID) {
@@ -363,5 +363,5 @@
 }
 
-AudioMediaPlayerInfo AudioMediaPlayer::getInfo() const throw(Error)
+AudioMediaPlayerInfo AudioMediaPlayer::getInfo() const PJSUA2_THROW(Error)
 {
     AudioMediaPlayerInfo info;
@@ -379,5 +379,5 @@
 }
 
-pj_uint32_t AudioMediaPlayer::getPos() const throw(Error)
+pj_uint32_t AudioMediaPlayer::getPos() const PJSUA2_THROW(Error)
 {
     pj_ssize_t pos = pjsua_player_get_pos(playerId);
@@ -388,5 +388,5 @@
 }
 
-void AudioMediaPlayer::setPos(pj_uint32_t samples) throw(Error)
+void AudioMediaPlayer::setPos(pj_uint32_t samples) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_player_set_pos(playerId, samples) );
@@ -426,5 +426,5 @@
 				        long max_size,
 				        unsigned options)
-				        throw(Error)
+				        PJSUA2_THROW(Error)
 {
     PJ_UNUSED_ARG(max_size);
@@ -476,5 +476,6 @@
 
 void ToneGenerator::createToneGenerator(unsigned clock_rate,
-					unsigned channel_count) throw(Error)
+					unsigned channel_count)
+					PJSUA2_THROW(Error)
 {
     pj_status_t status;
@@ -504,5 +505,5 @@
 }
 
-void ToneGenerator::stop() throw(Error)
+void ToneGenerator::stop() PJSUA2_THROW(Error)
 {
     pj_status_t status;
@@ -516,5 +517,5 @@
 }
 
-void ToneGenerator::rewind() throw(Error)
+void ToneGenerator::rewind() PJSUA2_THROW(Error)
 {
     pj_status_t status;
@@ -529,5 +530,5 @@
 
 void ToneGenerator::play(const ToneDescVector &tones,
-                         bool loop) throw(Error)
+                         bool loop) PJSUA2_THROW(Error)
 {
     pj_status_t status;
@@ -546,5 +547,5 @@
 
 void ToneGenerator::playDigits(const ToneDigitVector &digits,
-                               bool loop) throw(Error)
+                               bool loop) PJSUA2_THROW(Error)
 {
     pj_status_t status;
@@ -557,10 +558,12 @@
     }
 
-    status = pjmedia_tonegen_play_digits(tonegen, (unsigned)digits.size(), &digits[0],
+    status = pjmedia_tonegen_play_digits(tonegen,
+					 (unsigned)digits.size(),
+					 &digits[0],
 					 loop? PJMEDIA_TONEGEN_LOOP : 0);
     PJSUA2_CHECK_RAISE_ERROR2(status, "ToneGenerator::playDigits()");
 }
 
-ToneDigitMapVector ToneGenerator::getDigitMap() const throw(Error)
+ToneDigitMapVector ToneGenerator::getDigitMap() const PJSUA2_THROW(Error)
 {
     const pjmedia_tone_digit_map *pdm;
@@ -594,5 +597,5 @@
 
 void ToneGenerator::setDigitMap(const ToneDigitMapVector &digit_map)
-				throw(Error)
+				PJSUA2_THROW(Error)
 {
     unsigned i;
@@ -682,10 +685,10 @@
 }
 
-int AudDevManager::getCaptureDev() const throw(Error)
+int AudDevManager::getCaptureDev() const PJSUA2_THROW(Error)
 {
     return getActiveDev(true);
 }
 
-AudioMedia &AudDevManager::getCaptureDevMedia() throw(Error)
+AudioMedia &AudDevManager::getCaptureDevMedia() PJSUA2_THROW(Error)
 {
     if (!devMedia)
@@ -694,10 +697,10 @@
 }
 
-int AudDevManager::getPlaybackDev() const throw(Error)
+int AudDevManager::getPlaybackDev() const PJSUA2_THROW(Error)
 {
     return getActiveDev(false);
 }
 
-AudioMedia &AudDevManager::getPlaybackDevMedia() throw(Error)
+AudioMedia &AudDevManager::getPlaybackDevMedia() PJSUA2_THROW(Error)
 {
     if (!devMedia)
@@ -706,5 +709,5 @@
 }
 
-void AudDevManager::setCaptureDev(int capture_dev) const throw(Error)
+void AudDevManager::setCaptureDev(int capture_dev) const PJSUA2_THROW(Error)
 {    
     pjsua_snd_dev_param param;
@@ -726,5 +729,5 @@
 }
 
-void AudDevManager::setPlaybackDev(int playback_dev) const throw(Error)
+void AudDevManager::setPlaybackDev(int playback_dev) const PJSUA2_THROW(Error)
 {
     pjsua_snd_dev_param param;
@@ -746,5 +749,5 @@
 }
 
-const AudioDevInfoVector &AudDevManager::enumDev() throw(Error)
+const AudioDevInfoVector &AudDevManager::enumDev() PJSUA2_THROW(Error)
 {
     pjmedia_aud_dev_info pj_info[MAX_DEV_COUNT];
@@ -764,5 +767,5 @@
 }
 
-AudioDevInfoVector2 AudDevManager::enumDev2() const throw(Error)
+AudioDevInfoVector2 AudDevManager::enumDev2() const PJSUA2_THROW(Error)
 {
     pjmedia_aud_dev_info pj_info[MAX_DEV_COUNT];
@@ -781,5 +784,5 @@
 }
 
-void AudDevManager::setNullDev() throw(Error)
+void AudDevManager::setNullDev() PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_set_null_snd_dev() );
@@ -791,5 +794,5 @@
 }
 
-void AudDevManager::setSndDevMode(unsigned mode) const throw(Error)
+void AudDevManager::setSndDevMode(unsigned mode) const PJSUA2_THROW(Error)
 {    
     int capture_dev = 0, playback_dev = 0;
@@ -807,10 +810,10 @@
 
 void AudDevManager::setEcOptions(unsigned tail_msec,
-				 unsigned options) throw(Error)
+				 unsigned options) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_set_ec(tail_msec, options) );
 }
 
-unsigned AudDevManager::getEcTail() const throw(Error)
+unsigned AudDevManager::getEcTail() const PJSUA2_THROW(Error)
 {
     unsigned tail_msec = 0;
@@ -826,5 +829,5 @@
 }
 
-void AudDevManager::refreshDevs() throw(Error)
+void AudDevManager::refreshDevs() PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjmedia_aud_dev_refresh() );
@@ -837,5 +840,5 @@
 
 AudioDevInfo
-AudDevManager::getDevInfo(int id) const throw(Error)
+AudDevManager::getDevInfo(int id) const PJSUA2_THROW(Error)
 {
     AudioDevInfo dev_info;
@@ -849,5 +852,5 @@
 
 int AudDevManager::lookupDev(const string &drv_name,
-			     const string &dev_name) const throw(Error)
+			     const string &dev_name) const PJSUA2_THROW(Error)
 {
     pjmedia_aud_dev_index pj_idx = 0;
@@ -868,5 +871,5 @@
 void
 AudDevManager::setExtFormat(const MediaFormatAudio &format,
-			    bool keep) throw(Error)
+			    bool keep) PJSUA2_THROW(Error)
 {
     pjmedia_format pj_format = format.toPj();
@@ -877,5 +880,5 @@
 }
 
-MediaFormatAudio AudDevManager::getExtFormat() const throw(Error)
+MediaFormatAudio AudDevManager::getExtFormat() const PJSUA2_THROW(Error)
 {
     pjmedia_format pj_format;
@@ -891,5 +894,5 @@
 
 void AudDevManager::setInputLatency(unsigned latency_msec,
-				    bool keep) throw(Error)
+				    bool keep) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_INPUT_LATENCY,
@@ -898,5 +901,5 @@
 }
 
-unsigned AudDevManager::getInputLatency() const throw(Error)
+unsigned AudDevManager::getInputLatency() const PJSUA2_THROW(Error)
 {
     unsigned latency_msec = 0;
@@ -910,5 +913,5 @@
 void
 AudDevManager::setOutputLatency(unsigned latency_msec,
-				bool keep) throw(Error)
+				bool keep) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_OUTPUT_LATENCY,
@@ -917,5 +920,5 @@
 }
 
-unsigned AudDevManager::getOutputLatency() const throw(Error)
+unsigned AudDevManager::getOutputLatency() const PJSUA2_THROW(Error)
 {
     unsigned latency_msec = 0;
@@ -927,5 +930,6 @@
 }
 
-void AudDevManager::setInputVolume(unsigned volume, bool keep) throw(Error)
+void AudDevManager::setInputVolume(unsigned volume, bool keep)
+				   PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR(
@@ -935,5 +939,5 @@
 }
 
-unsigned AudDevManager::getInputVolume() const throw(Error)
+unsigned AudDevManager::getInputVolume() const PJSUA2_THROW(Error)
 {
     unsigned volume = 0;
@@ -946,5 +950,6 @@
 }
 
-void AudDevManager::setOutputVolume(unsigned volume, bool keep) throw(Error)
+void AudDevManager::setOutputVolume(unsigned volume, bool keep)
+				    PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR(
@@ -954,5 +959,5 @@
 }
 
-unsigned AudDevManager::getOutputVolume() const throw(Error)
+unsigned AudDevManager::getOutputVolume() const PJSUA2_THROW(Error)
 {
     unsigned volume = 0;
@@ -965,5 +970,5 @@
 }
 
-unsigned AudDevManager::getInputSignal() const throw(Error)
+unsigned AudDevManager::getInputSignal() const PJSUA2_THROW(Error)
 {
     unsigned signal = 0;
@@ -976,5 +981,5 @@
 }
 
-unsigned AudDevManager::getOutputSignal() const throw(Error)
+unsigned AudDevManager::getOutputSignal() const PJSUA2_THROW(Error)
 {
     unsigned signal = 0;
@@ -989,5 +994,5 @@
 void
 AudDevManager::setInputRoute(pjmedia_aud_dev_route route,
-			     bool keep) throw(Error)
+			     bool keep) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE,
@@ -996,5 +1001,5 @@
 }
 
-pjmedia_aud_dev_route AudDevManager::getInputRoute() const throw(Error)
+pjmedia_aud_dev_route AudDevManager::getInputRoute() const PJSUA2_THROW(Error)
 {
     pjmedia_aud_dev_route route = PJMEDIA_AUD_DEV_ROUTE_DEFAULT;
@@ -1008,5 +1013,5 @@
 void
 AudDevManager::setOutputRoute(pjmedia_aud_dev_route route,
-			      bool keep) throw(Error)
+			      bool keep) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE,
@@ -1015,5 +1020,6 @@
 }
 
-pjmedia_aud_dev_route AudDevManager::getOutputRoute() const throw(Error)
+pjmedia_aud_dev_route AudDevManager::getOutputRoute() const
+						    PJSUA2_THROW(Error)
 {
     pjmedia_aud_dev_route route = PJMEDIA_AUD_DEV_ROUTE_DEFAULT;
@@ -1025,5 +1031,5 @@
 }
 
-void AudDevManager::setVad(bool enable, bool keep) throw(Error)
+void AudDevManager::setVad(bool enable, bool keep) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_VAD,
@@ -1032,5 +1038,5 @@
 }
 
-bool AudDevManager::getVad() const throw(Error)
+bool AudDevManager::getVad() const PJSUA2_THROW(Error)
 {
     bool enable = false;
@@ -1042,5 +1048,5 @@
 }
 
-void AudDevManager::setCng(bool enable, bool keep) throw(Error)
+void AudDevManager::setCng(bool enable, bool keep) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_CNG,
@@ -1049,5 +1055,5 @@
 }
 
-bool AudDevManager::getCng() const throw(Error)
+bool AudDevManager::getCng() const PJSUA2_THROW(Error)
 {
     bool enable = false;
@@ -1059,5 +1065,5 @@
 }
 
-void AudDevManager::setPlc(bool enable, bool keep) throw(Error)
+void AudDevManager::setPlc(bool enable, bool keep) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_PLC,
@@ -1066,5 +1072,5 @@
 }
 
-bool AudDevManager::getPlc() const throw(Error)
+bool AudDevManager::getPlc() const PJSUA2_THROW(Error)
 {
     bool enable = false;
@@ -1084,5 +1090,5 @@
 }
 
-int AudDevManager::getActiveDev(bool is_capture) const throw(Error)
+int AudDevManager::getActiveDev(bool is_capture) const PJSUA2_THROW(Error)
 {
     int capture_dev = 0, playback_dev = 0;
@@ -1173,5 +1179,5 @@
 }
 
-VideoWindowInfo VideoWindow::getInfo() const throw(Error)
+VideoWindowInfo VideoWindow::getInfo() const PJSUA2_THROW(Error)
 {
     VideoWindowInfo vwi;
@@ -1195,5 +1201,5 @@
 }
 
-VideoMedia VideoWindow::getVideoMedia() throw(Error)
+VideoMedia VideoWindow::getVideoMedia() PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1214,5 +1220,5 @@
 }
 
-void VideoWindow::Show(bool show) throw(Error)
+void VideoWindow::Show(bool show) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1223,5 +1229,5 @@
 }
 
-void VideoWindow::setPos(const MediaCoordinate &pos) throw(Error)
+void VideoWindow::setPos(const MediaCoordinate &pos) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1236,5 +1242,5 @@
 }
 
-void VideoWindow::setSize(const MediaSize &size) throw(Error)
+void VideoWindow::setSize(const MediaSize &size) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1249,5 +1255,5 @@
 }
 
-void VideoWindow::rotate(int angle) throw(Error)
+void VideoWindow::rotate(int angle) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1258,5 +1264,5 @@
 }
 
-void VideoWindow::setWindow(const VideoWindowHandle &win) throw(Error)
+void VideoWindow::setWindow(const VideoWindowHandle &win) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1327,5 +1333,5 @@
 }
 
-void VideoPreview::start(const VideoPreviewOpParam &param) throw(Error)
+void VideoPreview::start(const VideoPreviewOpParam &param) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1338,5 +1344,5 @@
 }
 
-void VideoPreview::stop() throw(Error)
+void VideoPreview::stop() PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1354,5 +1360,5 @@
 }
 
-VideoMedia VideoPreview::getVideoMedia() throw(Error)
+VideoMedia VideoPreview::getVideoMedia() PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1444,5 +1450,5 @@
 
 ///////////////////////////////////////////////////////////////////////////////
-void VidDevManager::refreshDevs() throw(Error)
+void VidDevManager::refreshDevs() PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1460,5 +1466,5 @@
 }
 
-VideoDevInfo VidDevManager::getDevInfo(int dev_id) const throw(Error)
+VideoDevInfo VidDevManager::getDevInfo(int dev_id) const PJSUA2_THROW(Error)
 {
     VideoDevInfo dev_info;
@@ -1475,5 +1481,5 @@
 }
 
-const VideoDevInfoVector &VidDevManager::enumDev() throw(Error)
+const VideoDevInfoVector &VidDevManager::enumDev() PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1495,5 +1501,5 @@
 }
 
-VideoDevInfoVector2 VidDevManager::enumDev2() const throw(Error)
+VideoDevInfoVector2 VidDevManager::enumDev2() const PJSUA2_THROW(Error)
 {
     VideoDevInfoVector2 vdiv2;
@@ -1514,5 +1520,5 @@
 
 int VidDevManager::lookupDev(const string &drv_name,
-			     const string &dev_name) const throw(Error)
+			     const string &dev_name) const PJSUA2_THROW(Error)
 {
     pjmedia_vid_dev_index pj_idx = 0;
@@ -1541,5 +1547,5 @@
 void VidDevManager::setFormat(int dev_id,
 			      const MediaFormatVideo &format,
-			      bool keep) throw(Error)
+			      bool keep) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1557,5 +1563,6 @@
 }
 
-MediaFormatVideo VidDevManager::getFormat(int dev_id) const throw(Error)
+MediaFormatVideo VidDevManager::getFormat(int dev_id) const
+					  PJSUA2_THROW(Error)
 {
     MediaFormatVideo vid_format;
@@ -1575,5 +1582,5 @@
 void VidDevManager::setInputScale(int dev_id,
 				  const MediaSize &scale,
-				  bool keep) throw(Error)
+				  bool keep) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1592,5 +1599,5 @@
 }
 
-MediaSize VidDevManager::getInputScale(int dev_id) const throw(Error)
+MediaSize VidDevManager::getInputScale(int dev_id) const PJSUA2_THROW(Error)
 {
     MediaSize scale;
@@ -1612,5 +1619,5 @@
 void VidDevManager::setOutputWindowFlags(int dev_id, 
 					 int flags, 
-					 bool keep) throw(Error)
+					 bool keep) PJSUA2_THROW(Error)
 {    
 #if PJSUA_HAS_VIDEO    
@@ -1626,5 +1633,5 @@
 }
 
-int VidDevManager::getOutputWindowFlags(int dev_id) throw(Error)
+int VidDevManager::getOutputWindowFlags(int dev_id) PJSUA2_THROW(Error)
 {
     int flags = 0;
@@ -1641,5 +1648,6 @@
 
 void VidDevManager::switchDev(int dev_id,
-			      const VideoSwitchParam &param) throw(Error)
+			      const VideoSwitchParam &param)
+			      PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1679,5 +1687,5 @@
 void VidDevManager::setCaptureOrient(pjmedia_vid_dev_index dev_id,
     			  	     pjmedia_orient orient,
-    			  	     bool keep) throw(Error)
+    			  	     bool keep) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1867,5 +1875,5 @@
 
 void VideoMedia::registerMediaPort(MediaPort port, pj_pool_t *pool)
-     throw(Error)
+     PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1907,5 +1915,5 @@
 }
 
-VidConfPortInfo VideoMedia::getPortInfo() const throw(Error)
+VidConfPortInfo VideoMedia::getPortInfo() const PJSUA2_THROW(Error)
 {
     return VideoMedia::getPortInfoFromId(id);
@@ -1917,5 +1925,5 @@
 }
 
-VidConfPortInfo VideoMedia::getPortInfoFromId(int port_id) throw(Error)
+VidConfPortInfo VideoMedia::getPortInfoFromId(int port_id) PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
@@ -1934,5 +1942,5 @@
 void VideoMedia::startTransmit(const VideoMedia &sink,
 			       const VideoMediaTransmitParam &param) const
-     throw(Error)
+     PJSUA2_THROW(Error)
 {
     PJ_UNUSED_ARG(param);
@@ -1945,5 +1953,6 @@
 }
 
-void VideoMedia::stopTransmit(const VideoMedia &sink) const throw(Error)
+void VideoMedia::stopTransmit(const VideoMedia &sink) const
+			      PJSUA2_THROW(Error)
 {
 #if PJSUA_HAS_VIDEO
Index: pjproject/trunk/pjsip/src/pjsua2/persistent.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/persistent.cpp	(revision 6025)
+++ pjproject/trunk/pjsip/src/pjsua2/persistent.cpp	(revision 6026)
@@ -28,25 +28,28 @@
 }
 
-string PersistentDocument::unreadName() const throw(Error)
+string PersistentDocument::unreadName() const PJSUA2_THROW(Error)
 {
     return getRootContainer().unreadName();
 }
 
-int PersistentDocument::readInt(const string &name) const throw(Error)
+int PersistentDocument::readInt(const string &name) const PJSUA2_THROW(Error)
 {
     return (int)getRootContainer().readNumber(name);
 }
 
-float PersistentDocument::readNumber(const string &name) const throw(Error)
+float PersistentDocument::readNumber(const string &name) const
+				     PJSUA2_THROW(Error)
 {
     return getRootContainer().readNumber(name);
 }
 
-bool PersistentDocument::readBool(const string &name) const throw(Error)
+bool PersistentDocument::readBool(const string &name) const
+				  PJSUA2_THROW(Error)
 {
     return getRootContainer().readBool(name);
 }
 
-string PersistentDocument::readString(const string &name) const throw(Error)
+string PersistentDocument::readString(const string &name) const
+				      PJSUA2_THROW(Error)
 {
     return getRootContainer().readString(name);
@@ -54,10 +57,11 @@
 
 StringVector PersistentDocument::readStringVector(const string &name) const
-						  throw(Error)
+						  PJSUA2_THROW(Error)
 {
     return getRootContainer().readStringVector(name);
 }
 
-void PersistentDocument::readObject(PersistentObject &obj) const throw(Error)
+void PersistentDocument::readObject(PersistentObject &obj) const
+				    PJSUA2_THROW(Error)
 {
     getRootContainer().readObject(obj);
@@ -65,5 +69,5 @@
 
 ContainerNode PersistentDocument::readContainer(const string &name) const
-					        throw(Error)
+					        PJSUA2_THROW(Error)
 {
     return getRootContainer().readContainer(name);
@@ -71,5 +75,5 @@
 
 ContainerNode PersistentDocument::readArray(const string &name) const
-					    throw(Error)
+					    PJSUA2_THROW(Error)
 {
     return getRootContainer().readArray(name);
@@ -77,5 +81,5 @@
 
 void PersistentDocument::writeNumber(const string &name,
-				     float num) throw(Error)
+				     float num) PJSUA2_THROW(Error)
 {
     getRootContainer().writeNumber(name, num);
@@ -83,5 +87,5 @@
 
 void PersistentDocument::writeInt(const string &name,
-				  int num) throw(Error)
+				  int num) PJSUA2_THROW(Error)
 {
     getRootContainer().writeNumber(name, (float)num);
@@ -89,5 +93,5 @@
 
 void PersistentDocument::writeBool(const string &name,
-				   bool value) throw(Error)
+				   bool value) PJSUA2_THROW(Error)
 {
     getRootContainer().writeBool(name, value);
@@ -95,5 +99,5 @@
 
 void PersistentDocument::writeString(const string &name,
-                                     const string &value) throw(Error)
+                                     const string &value) PJSUA2_THROW(Error)
 {
     getRootContainer().writeString(name, value);
@@ -102,10 +106,11 @@
 void PersistentDocument::writeStringVector(const string &name,
                                            const StringVector &value)
-					   throw(Error)
+					   PJSUA2_THROW(Error)
 {
     getRootContainer().writeStringVector(name, value);
 }
 
-void PersistentDocument::writeObject(const PersistentObject &obj) throw(Error)
+void PersistentDocument::writeObject(const PersistentObject &obj)
+				     PJSUA2_THROW(Error)
 {
     getRootContainer().writeObject(obj);
@@ -113,5 +118,5 @@
 
 ContainerNode PersistentDocument::writeNewContainer(const string &name)
-						    throw(Error)
+						    PJSUA2_THROW(Error)
 {
     return getRootContainer().writeNewContainer(name);
@@ -119,5 +124,5 @@
 
 ContainerNode PersistentDocument::writeNewArray(const string &name)
-						    throw(Error)
+						    PJSUA2_THROW(Error)
 {
     return getRootContainer().writeNewArray(name);
@@ -131,25 +136,25 @@
 }
 
-string ContainerNode::unreadName() const throw(Error)
+string ContainerNode::unreadName() const PJSUA2_THROW(Error)
 {
     return op->unreadName(this);
 }
 
-int ContainerNode::readInt(const string &name) const throw(Error)
+int ContainerNode::readInt(const string &name) const PJSUA2_THROW(Error)
 {
     return (int)op->readNumber(this, name);
 }
 
-float ContainerNode::readNumber(const string &name) const throw(Error)
+float ContainerNode::readNumber(const string &name) const PJSUA2_THROW(Error)
 {
     return op->readNumber(this, name);
 }
 
-bool ContainerNode::readBool(const string &name) const throw(Error)
+bool ContainerNode::readBool(const string &name) const PJSUA2_THROW(Error)
 {
     return op->readBool(this, name);
 }
 
-string ContainerNode::readString(const string &name) const throw(Error)
+string ContainerNode::readString(const string &name) const PJSUA2_THROW(Error)
 {
     return op->readString(this, name);
@@ -157,10 +162,11 @@
 
 StringVector ContainerNode::readStringVector(const string &name) const
-					     throw(Error)
+					     PJSUA2_THROW(Error)
 {
     return op->readStringVector(this, name);
 }
 
-void ContainerNode::readObject(PersistentObject &obj) const throw(Error)
+void ContainerNode::readObject(PersistentObject &obj) const
+			       PJSUA2_THROW(Error)
 {
     obj.readObject(*this);
@@ -168,5 +174,5 @@
 
 ContainerNode ContainerNode::readContainer(const string &name) const
-					   throw(Error)
+					   PJSUA2_THROW(Error)
 {
     return op->readContainer(this, name);
@@ -174,5 +180,5 @@
 
 ContainerNode ContainerNode::readArray(const string &name) const
-					   throw(Error)
+					   PJSUA2_THROW(Error)
 {
     return op->readArray(this, name);
@@ -180,5 +186,5 @@
 
 void ContainerNode::writeNumber(const string &name,
-				float num) throw(Error)
+				float num) PJSUA2_THROW(Error)
 {
     return op->writeNumber(this, name, num);
@@ -186,5 +192,5 @@
 
 void ContainerNode::writeInt(const string &name,
-			     int num) throw(Error)
+			     int num) PJSUA2_THROW(Error)
 {
     return op->writeNumber(this, name, (float)num);
@@ -192,5 +198,5 @@
 
 void ContainerNode::writeBool(const string &name,
-			      bool value) throw(Error)
+			      bool value) PJSUA2_THROW(Error)
 {
     return op->writeBool(this, name, value);
@@ -198,5 +204,5 @@
 
 void ContainerNode::writeString(const string &name,
-				const string &value) throw(Error)
+				const string &value) PJSUA2_THROW(Error)
 {
     return op->writeString(this, name, value);
@@ -205,10 +211,11 @@
 void ContainerNode::writeStringVector(const string &name,
 				      const StringVector &value)
-				      throw(Error)
+				      PJSUA2_THROW(Error)
 {
     return op->writeStringVector(this, name, value);
 }
 
-void ContainerNode::writeObject(const PersistentObject &obj) throw(Error)
+void ContainerNode::writeObject(const PersistentObject &obj)
+				PJSUA2_THROW(Error)
 {
     obj.writeObject(*this);
@@ -216,5 +223,5 @@
 
 ContainerNode ContainerNode::writeNewContainer(const string &name)
-					       throw(Error)
+					       PJSUA2_THROW(Error)
 {
     return op->writeNewContainer(this, name);
@@ -222,5 +229,5 @@
 
 ContainerNode ContainerNode::writeNewArray(const string &name)
-					   throw(Error)
+					   PJSUA2_THROW(Error)
 {
     return op->writeNewArray(this, name);
Index: pjproject/trunk/pjsip/src/pjsua2/presence.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/presence.cpp	(revision 6025)
+++ pjproject/trunk/pjsip/src/pjsua2/presence.cpp	(revision 6026)
@@ -37,5 +37,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void BuddyConfig::readObject(const ContainerNode &node) throw(Error)
+void BuddyConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("BuddyConfig");
@@ -45,5 +45,5 @@
 }
 
-void BuddyConfig::writeObject(ContainerNode &node) const throw(Error)
+void BuddyConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("BuddyConfig");
@@ -124,5 +124,6 @@
  * Create buddy and register the buddy to PJSUA-LIB.
  */
-void Buddy::create(Account &account, const BuddyConfig &cfg) throw(Error)
+void Buddy::create(Account &account, const BuddyConfig &cfg)
+		   PJSUA2_THROW(Error)
 {
     pjsua_buddy_config pj_cfg;
@@ -155,5 +156,5 @@
  * Get detailed buddy info.
  */
-BuddyInfo Buddy::getInfo() const throw(Error)
+BuddyInfo Buddy::getInfo() const PJSUA2_THROW(Error)
 {
     pjsua_buddy_info pj_bi;
@@ -168,5 +169,5 @@
  * Enable/disable buddy's presence monitoring.
  */
-void Buddy::subscribePresence(bool subscribe) throw(Error)
+void Buddy::subscribePresence(bool subscribe) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_buddy_subscribe_pres(id, subscribe) );
@@ -177,5 +178,5 @@
  * Update the presence information for the buddy.
  */
-void Buddy::updatePresence(void) throw(Error)
+void Buddy::updatePresence(void) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_buddy_update_pres(id) );
@@ -185,5 +186,6 @@
  * Send instant messaging outside dialog.
  */
-void Buddy::sendInstantMessage(const SendInstantMessageParam &prm) throw(Error)
+void Buddy::sendInstantMessage(const SendInstantMessageParam &prm)
+			       PJSUA2_THROW(Error)
 {
     BuddyInfo bi = getInfo();
@@ -211,5 +213,5 @@
  */
 void Buddy::sendTypingIndication(const SendTypingIndicationParam &prm)
-     throw(Error)
+     PJSUA2_THROW(Error)
 {
     BuddyInfo bi = getInfo();
Index: pjproject/trunk/pjsip/src/pjsua2/siptypes.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/siptypes.cpp	(revision 6025)
+++ pjproject/trunk/pjsip/src/pjsua2/siptypes.cpp	(revision 6026)
@@ -31,5 +31,5 @@
 void readIntVector( ContainerNode &node,
                     const string &array_name,
-                    IntVector &v) throw(Error)
+                    IntVector &v) PJSUA2_THROW(Error)
 {
     ContainerNode array_node = node.readArray(array_name);
@@ -42,5 +42,5 @@
 void writeIntVector(ContainerNode &node,
                     const string &array_name,
-                    const IntVector &v) throw(Error)
+                    const IntVector &v) PJSUA2_THROW(Error)
 {
     ContainerNode array_node = node.writeNewArray(array_name);
@@ -51,5 +51,5 @@
 
 void readQosParams( ContainerNode &node,
-                    pj_qos_params &qos) throw(Error)
+                    pj_qos_params &qos) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("qosParams");
@@ -62,5 +62,5 @@
 
 void writeQosParams( ContainerNode &node,
-                     const pj_qos_params &qos) throw(Error)
+                     const pj_qos_params &qos) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("qosParams");
@@ -74,5 +74,5 @@
 void readSipHeaders( const ContainerNode &node,
                      const string &array_name,
-                     SipHeaderVector &headers) throw(Error)
+                     SipHeaderVector &headers) PJSUA2_THROW(Error)
 {
     ContainerNode headers_node = node.readArray(array_name);
@@ -90,5 +90,5 @@
 void writeSipHeaders(ContainerNode &node,
                      const string &array_name,
-                     const SipHeaderVector &headers) throw(Error)
+                     const SipHeaderVector &headers) PJSUA2_THROW(Error)
 {
     ContainerNode headers_node = node.writeNewArray(array_name);
@@ -118,5 +118,5 @@
 }
 
-void AuthCredInfo::readObject(const ContainerNode &node) throw(Error)
+void AuthCredInfo::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AuthCredInfo");
@@ -132,5 +132,5 @@
 }
 
-void AuthCredInfo::writeObject(ContainerNode &node) const throw(Error)
+void AuthCredInfo::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AuthCredInfo");
@@ -209,5 +209,5 @@
 }
 
-void TlsConfig::readObject(const ContainerNode &node) throw(Error)
+void TlsConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("TlsConfig");
@@ -231,5 +231,5 @@
 }
 
-void TlsConfig::writeObject(ContainerNode &node) const throw(Error)
+void TlsConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("TlsConfig");
@@ -289,5 +289,5 @@
 }
 
-void TransportConfig::readObject(const ContainerNode &node) throw(Error)
+void TransportConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("TransportConfig");
@@ -302,5 +302,6 @@
 }
 
-void TransportConfig::writeObject(ContainerNode &node) const throw(Error)
+void TransportConfig::writeObject(ContainerNode &node) const
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("TransportConfig");
@@ -379,5 +380,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void SipHeader::fromPj(const pjsip_hdr *hdr) throw(Error)
+void SipHeader::fromPj(const pjsip_hdr *hdr) PJSUA2_THROW(Error)
 {
     char *buf = NULL;
@@ -436,5 +437,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void SipMultipartPart::fromPj(const pjsip_multipart_part &prm) throw(Error)
+void SipMultipartPart::fromPj(const pjsip_multipart_part &prm)
+			      PJSUA2_THROW(Error)
 {
     headers.clear();
@@ -575,5 +577,5 @@
 }
 
-void SipTxOption::fromPj(const pjsua_msg_data &prm) throw(Error)
+void SipTxOption::fromPj(const pjsua_msg_data &prm) PJSUA2_THROW(Error)
 {
     targetUri = pj2Str(prm.target_uri);
