javaextensions/wma/sms_cbs/src/smsconnectionimpljni.cpp
changeset 78 71ad690e91f5
parent 21 2a9601315dfc
equal deleted inserted replaced
72:1f0034e370aa 78:71ad690e91f5
    66     {
    66     {
    67         ELOG(EWMA,"WMA : Caught bad alloc exception");
    67         ELOG(EWMA,"WMA : Caught bad alloc exception");
    68         JniUtils::throwNewException(aJni, "java/lang/OutOfMemoryError" ,
    68         JniUtils::throwNewException(aJni, "java/lang/OutOfMemoryError" ,
    69                                     "Out of memory");
    69                                     "Out of memory");
    70     }
    70     }
    71     catch (ExceptionBase ex)
    71     catch (ExceptionBase &ex)
    72     {
    72     {
    73         ELOG(EWMA,"WMA : Caught an ExceptionBase exception");
    73         ELOG(EWMA,"WMA : Caught an ExceptionBase exception");
    74         JniUtils::throwNewException(aJni, "java/io/IOException" ,
    74         JniUtils::throwNewException(aJni, "java/io/IOException" ,
    75                                     "Opening connection failed");
    75                                     "Opening connection failed");
    76     }
    76     }
   134     try
   134     try
   135     {
   135     {
   136         numberOfSegments = msgConn->numberOfDataSegments(aType,len,hostPort,
   136         numberOfSegments = msgConn->numberOfDataSegments(aType,len,hostPort,
   137                            hostaddress,messageData);
   137                            hostaddress,messageData);
   138     }
   138     }
   139     catch (ExceptionBase ex)
   139     catch (ExceptionBase &ex)
   140     {
   140     {
   141         JniUtils::throwNewException(aJni, "java/lang/RuntimeException" ,
   141         JniUtils::throwNewException(aJni, "java/lang/RuntimeException" ,
   142                                     "Calculating number of segments failed");
   142                                     "Calculating number of segments failed");
   143     }
   143     }
   144     if (numberOfSegments < 0)
   144     if (numberOfSegments < 0)
   185     try
   185     try
   186     {
   186     {
   187         numberOfSegments = msgConn->numberOfDataSegments(aType,length,hostPort,
   187         numberOfSegments = msgConn->numberOfDataSegments(aType,length,hostPort,
   188                            hostaddress,(const char*)nativeString);
   188                            hostaddress,(const char*)nativeString);
   189     }
   189     }
   190     catch (ExceptionBase ex)
   190     catch (ExceptionBase &ex)
   191     {
   191     {
   192         JniUtils::throwNewException(aJni, "java/lang/RuntimeException" ,
   192         JniUtils::throwNewException(aJni, "java/lang/RuntimeException" ,
   193                                     "Calculating number of segments failed");
   193                                     "Calculating number of segments failed");
   194     }
   194     }
   195     if (numberOfSegments < 0)
   195     if (numberOfSegments < 0)