diff --git a/cxx b/cxx index 4918ab925..58feca699 160000 --- a/cxx +++ b/cxx @@ -1 +1 @@ -Subproject commit 4918ab925ec88046c85d396664c56e416b67c2c7 +Subproject commit 58feca699c6bfd8663671b1dcc9ac54b22826699 diff --git a/device-detection/device-detection.hash.engine.on-premise/src/main/cxx/Java_Hash_Engine.cpp b/device-detection/device-detection.hash.engine.on-premise/src/main/cxx/Java_Hash_Engine.cpp index 5b30e4512..1f8c38b14 100644 --- a/device-detection/device-detection.hash.engine.on-premise/src/main/cxx/Java_Hash_Engine.cpp +++ b/device-detection/device-detection.hash.engine.on-premise/src/main/cxx/Java_Hash_Engine.cpp @@ -310,6 +310,10 @@ template T SwigValueInit() { #include +#include +#include + + #include "cxx/src/dd/hash/EngineHash.hpp" #include "cxx/src/dd/hash/ResultsHashSerializer.hpp" #include "cxx/src/dd/Transform.hpp" @@ -560,6 +564,10 @@ SWIGINTERN void std_vector_Sl_uint8_t_Sg__doRemoveRange(std::vector< uint8_t > * throw std::out_of_range("vector index out of range"); } } + +#include +#include + SWIGINTERN std::vector< uint32_t > *new_std_vector_Sl_uint32_t_Sg___SWIG_2(jint count,unsigned int const &value){ if (count < 0) throw std::out_of_range("vector count must be positive"); @@ -836,6 +844,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -1072,6 +1085,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -1423,6 +1441,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -1482,6 +1505,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -1546,6 +1574,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -1613,6 +1646,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1); @@ -1675,6 +1713,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -1737,6 +1780,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -1798,6 +1846,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -1862,6 +1915,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -1926,6 +1984,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -1990,6 +2053,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -2051,6 +2119,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -2110,6 +2183,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -2174,6 +2252,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -2238,6 +2321,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -2302,6 +2390,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -2363,6 +2456,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -2422,6 +2520,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -2486,6 +2589,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -2550,6 +2658,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -2614,6 +2727,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -2675,6 +2793,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -2734,6 +2857,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -2798,6 +2926,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -2862,6 +2995,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -2926,6 +3064,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -2987,6 +3130,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -3046,6 +3194,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -3110,6 +3263,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -3174,6 +3332,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -3238,6 +3401,11 @@ SWIGEXPORT jdouble JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jdouble)result; return jresult; @@ -3299,6 +3467,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -3358,6 +3531,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -3420,6 +3598,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -3494,6 +3677,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -3558,6 +3746,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -3624,6 +3817,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -3698,6 +3896,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< std::string > > * >(new Value< std::vector< std::string > >(result)); return jresult; @@ -3764,6 +3967,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< std::string > > * >(new Value< std::vector< std::string > >(result)); return jresult; @@ -3838,6 +4046,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::string > * >(new Value< std::string >(result)); return jresult; @@ -3904,6 +4117,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::string > * >(new Value< std::string >(result)); return jresult; @@ -3978,6 +4196,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); return jresult; @@ -4044,6 +4267,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); return jresult; @@ -4118,6 +4346,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); return jresult; @@ -4184,6 +4417,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); return jresult; @@ -4258,6 +4496,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); return jresult; @@ -4324,6 +4567,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); return jresult; @@ -4398,6 +4646,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); return jresult; @@ -4464,6 +4717,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); return jresult; @@ -4538,6 +4796,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); return jresult; @@ -4604,6 +4867,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); return jresult; @@ -4678,6 +4946,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); return jresult; @@ -4744,6 +5017,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); return jresult; @@ -4808,6 +5086,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -4872,6 +5155,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -4936,6 +5224,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -4997,6 +5290,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -5059,6 +5357,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5123,6 +5426,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -5187,6 +5495,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5251,6 +5564,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5315,6 +5633,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5379,6 +5702,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5443,6 +5771,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -5507,6 +5840,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5571,6 +5909,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5635,6 +5978,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5699,6 +6047,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5763,6 +6116,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5827,6 +6185,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5888,6 +6251,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -5950,6 +6318,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -6014,6 +6387,11 @@ SWIGEXPORT int JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inter SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (int)result; return jresult; @@ -6078,6 +6456,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -6139,6 +6522,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6201,6 +6589,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -6262,6 +6655,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6321,6 +6719,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -6389,6 +6792,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -6453,6 +6861,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -6515,6 +6928,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6585,6 +7003,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -6654,6 +7077,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -6726,6 +7154,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6793,6 +7226,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -6859,6 +7297,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6930,6 +7373,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6999,6 +7447,11 @@ SWIGEXPORT jshort JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_in SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jshort)result; return jresult; @@ -7070,6 +7523,11 @@ SWIGEXPORT jshort JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_in SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jshort)*result; return jresult; @@ -7145,6 +7603,11 @@ SWIGEXPORT jshort JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_in SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jshort)result; return jresult; @@ -7216,6 +7679,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -7275,6 +7743,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -7352,6 +7825,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -7363,6 +7841,7 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int std::string arg1 ; unsigned char *arg2 = (unsigned char *)0 ; long arg3 ; + std::unique_ptr< unsigned char [] > buffer2 ; ValueMetaDataKey *result = 0 ; (void)jenv; @@ -7376,34 +7855,28 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int (&arg1)->assign(arg1_pstr); jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg2 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg2); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg2 = (unsigned char*)malloc(arrSize); - if (arg2 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer2.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer2) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return 0; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg2, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return 0; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg2, data, arrSize); - jenv->ReleaseByteArrayElements(jarg2, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg2, + 0, + (jsize)arrSize, + reinterpret_cast(buffer2.get())); + arg2 = buffer2.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -7461,6 +7934,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); @@ -7526,6 +8004,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -7590,6 +8073,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -7651,6 +8139,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -7713,6 +8206,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -7777,6 +8275,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -7841,6 +8344,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -7905,6 +8413,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< uint8_t > * >(new std::vector< uint8_t >(result)); return jresult; @@ -7966,6 +8479,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8025,6 +8543,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8091,6 +8614,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); @@ -8158,6 +8686,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8222,6 +8755,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -8283,6 +8821,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8354,6 +8897,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8420,6 +8968,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8484,6 +9037,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -8545,6 +9103,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8609,6 +9172,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8675,6 +9243,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8739,6 +9312,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -8800,6 +9378,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8871,6 +9454,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8937,6 +9525,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9001,6 +9594,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -9062,6 +9660,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -9124,6 +9727,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9188,6 +9796,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9252,6 +9865,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9316,6 +9934,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9383,6 +10006,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9450,6 +10078,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9517,6 +10150,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9584,6 +10222,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9651,6 +10294,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9718,6 +10366,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9785,6 +10438,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9852,6 +10510,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9913,6 +10576,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -9983,6 +10651,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10053,6 +10726,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10115,6 +10793,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10179,6 +10862,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -10246,6 +10934,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10308,6 +11001,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10325,6 +11023,12 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2) return ; } + + if (!arg2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "The file name is null"); + return ; + } + { try { (arg1)->refreshData((char const *)arg2);; @@ -10374,6 +11078,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); } @@ -10383,40 +11092,35 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte EngineBase *arg1 = 0 ; unsigned char *arg2 = (unsigned char *)0 ; long arg3 ; + std::unique_ptr< unsigned char [] > buffer2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = fiftyoneFromJlong< EngineBase * >(jarg1); { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg2 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg2); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg2 = (unsigned char*)malloc(arrSize); - if (arg2 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer2.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer2) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return ; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg2, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return ; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg2, data, arrSize); - jenv->ReleaseByteArrayElements(jarg2, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg2, + 0, + (jsize)arrSize, + reinterpret_cast(buffer2.get())); + arg2 = buffer2.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -10474,6 +11178,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10537,6 +11246,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -10601,6 +11315,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -10665,6 +11384,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -10729,6 +11453,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -10793,6 +11522,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -10857,6 +11591,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -10921,6 +11660,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -10985,6 +11729,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -11049,6 +11798,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -11113,6 +11867,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -11174,6 +11933,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11236,6 +12000,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11298,6 +12067,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11360,6 +12134,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11429,6 +12208,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11491,6 +12275,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -11555,6 +12344,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -11619,6 +12413,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -11683,6 +12482,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -11747,6 +12551,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -11811,6 +12620,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11873,6 +12687,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11935,6 +12754,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11997,6 +12821,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -12061,6 +12890,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -12125,6 +12959,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -12186,6 +13025,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12245,6 +13089,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -12306,6 +13155,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12365,6 +13219,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -12426,6 +13285,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12521,6 +13385,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -12591,6 +13460,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); @@ -12653,6 +13527,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12715,6 +13594,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -12781,6 +13665,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -12845,6 +13734,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -12906,6 +13800,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12965,6 +13864,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -13027,6 +13931,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -13093,6 +14002,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -13157,6 +14071,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13223,6 +14142,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13287,6 +14211,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13353,6 +14282,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13417,6 +14351,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13483,6 +14422,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13547,6 +14491,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -13611,6 +14560,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13675,6 +14629,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13741,6 +14700,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -13805,6 +14769,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13866,6 +14835,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -13930,6 +14904,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -13992,6 +14971,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14054,6 +15038,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14116,6 +15105,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -14180,6 +15174,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -14244,6 +15243,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -14305,6 +15309,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14364,6 +15373,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -14426,6 +15440,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14486,6 +15505,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14546,6 +15570,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14606,6 +15635,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14666,6 +15700,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14728,6 +15767,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14790,6 +15834,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14852,6 +15901,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14914,6 +15968,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14976,6 +16035,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15038,6 +16102,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15100,6 +16169,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15169,6 +16243,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15231,6 +16310,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< CollectionConfig * >(new CollectionConfig(result)); return jresult; @@ -15295,6 +16379,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< CollectionConfig * >(new CollectionConfig(result)); return jresult; @@ -15359,6 +16448,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< CollectionConfig * >(new CollectionConfig(result)); return jresult; @@ -15423,6 +16517,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< CollectionConfig * >(new CollectionConfig(result)); return jresult; @@ -15487,6 +16586,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< CollectionConfig * >(new CollectionConfig(result)); return jresult; @@ -15551,6 +16655,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< CollectionConfig * >(new CollectionConfig(result)); return jresult; @@ -15615,6 +16724,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -15679,6 +16793,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -15743,6 +16862,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -15807,6 +16931,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -15871,6 +17000,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -15935,6 +17069,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -15999,6 +17138,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -16063,6 +17207,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -16124,6 +17273,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16183,6 +17337,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -16251,6 +17410,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -16315,6 +17479,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -16377,6 +17546,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16447,6 +17621,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -16516,6 +17695,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -16588,6 +17772,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16655,6 +17844,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -16721,6 +17915,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16792,6 +17991,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16861,6 +18065,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -16932,6 +18141,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)*result; return jresult; @@ -17007,6 +18221,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -17078,6 +18297,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17137,6 +18361,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17212,6 +18441,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -17224,6 +18458,7 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int long arg2 ; ConfigHash *arg3 = 0 ; RequiredPropertiesConfig *arg4 = 0 ; + std::unique_ptr< unsigned char [] > buffer1 ; EngineHash *result = 0 ; (void)jenv; @@ -17231,34 +18466,28 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int (void)jarg3_; (void)jarg4_; { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg1 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg1); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg1 = (unsigned char*)malloc(arrSize); - if (arg1 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer1.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer1) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return 0; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg1, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return 0; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg1, data, arrSize); - jenv->ReleaseByteArrayElements(jarg1, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg1, + 0, + (jsize)arrSize, + reinterpret_cast(buffer1.get())); + arg1 = buffer1.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -17318,6 +18547,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); @@ -17383,6 +18617,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -17447,6 +18686,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -17518,6 +18762,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -17589,6 +18838,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -17653,6 +18907,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -17717,6 +18976,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -17779,6 +19043,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17796,6 +19065,12 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2) return ; } + + if (!arg2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "The file name is null"); + return ; + } + { try { (arg1)->refreshData((char const *)arg2);; @@ -17845,6 +19120,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); } @@ -17854,40 +19134,35 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte EngineHash *arg1 = 0 ; unsigned char *arg2 = (unsigned char *)0 ; long arg3 ; + std::unique_ptr< unsigned char [] > buffer2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = fiftyoneFromJlong< EngineHash * >(jarg1); { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg2 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg2); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg2 = (unsigned char*)malloc(arrSize); - if (arg2 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer2.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer2) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return ; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg2, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return ; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg2, data, arrSize); - jenv->ReleaseByteArrayElements(jarg2, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg2, + 0, + (jsize)arrSize, + reinterpret_cast(buffer2.get())); + arg2 = buffer2.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -17945,6 +19220,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18011,6 +19291,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18081,6 +19366,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); @@ -18166,6 +19456,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< uint32_t > * >(new std::vector< uint32_t >(result)); return jresult; @@ -18233,6 +19528,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18300,6 +19600,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18370,6 +19675,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); @@ -18432,6 +19742,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18491,6 +19806,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18554,6 +19874,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18621,6 +19946,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_i SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -18682,6 +20012,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18741,6 +20076,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18804,6 +20144,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18878,6 +20223,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::map< std::string,std::string,std::less< std::string > > * >(new std::map< std::string,std::string,std::less< std::string > >(result)); return jresult; @@ -18952,6 +20302,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::map< std::string,std::string,std::less< std::string > > * >(new std::map< std::string,std::string,std::less< std::string > >(result)); return jresult; @@ -19026,6 +20381,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::map< std::string,std::string,std::less< std::string > > * >(new std::map< std::string,std::string,std::less< std::string > >(result)); return jresult; @@ -19087,6 +20447,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -19169,6 +20534,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_inte SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, JNI_ABORT); @@ -19250,6 +20620,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::string > * >(new Value< std::string >(result)); { @@ -19329,6 +20704,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< std::string > > * >(new Value< std::vector< std::string > >(result)); { @@ -19408,6 +20788,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); { @@ -19487,6 +20872,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); { @@ -19566,6 +20956,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_int SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); { @@ -19645,6 +21040,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_devicedetection_hash_engine_onpremise_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; { diff --git a/device-detection/device-detection.hash.engine.on-premise/src/main/cxx/hash_java.i b/device-detection/device-detection.hash.engine.on-premise/src/main/cxx/hash_java.i index 649ac3006..55daecbd8 100644 --- a/device-detection/device-detection.hash.engine.on-premise/src/main/cxx/hash_java.i +++ b/device-detection/device-detection.hash.engine.on-premise/src/main/cxx/hash_java.i @@ -211,6 +211,15 @@ nofinalize(EvidenceDeviceDetection); nofinalize(ResultsDeviceDetection); nofinalize(ResultsHash); +/* A null file name would reach the native code as a null C string, which it + reads without a check. It throws a NullPointerException instead. */ +%typemap(check) const char *fileName %{ + if (!$1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "The file name is null"); + return $null; + } +%} + %include "cxx/src/dd/hash/hash.i" /* Avoid copying the key and value character by character and pass a pointer instead. diff --git a/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/flowelements/DataRefreshTests.java b/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/flowelements/DataRefreshTests.java index 9e61d79af..7122d72ec 100644 --- a/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/flowelements/DataRefreshTests.java +++ b/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/flowelements/DataRefreshTests.java @@ -32,6 +32,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; @@ -48,6 +49,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import static org.junit.Assume.assumeTrue; /** * Refreshing the engine's data, with the free Lite data file. Refreshes @@ -61,6 +63,8 @@ public class DataRefreshTests extends TestsBase { private static final int REFRESHES = 5; + private static final int LEAK_REFRESHES = 10; + private static final long WAIT_SECONDS = 300; private static final List USER_AGENTS = Arrays.asList( @@ -147,6 +151,52 @@ public void Refresh_FromMemoryOnSeveralThreads_EngineStillWorks() assertEquals(expected, isMobile()); } + /** + * Refreshing the engine from memory many times leaves the memory the + * process uses about where it was, so no refresh keeps a copy of the + * data it was given. Where each refresh kept one, the process would + * grow by the size of the data file every time. The resident size is + * read from /proc, so the test runs only where there is one. + */ + @Test + public void Refresh_FromMemoryManyTimes_KeepsNoCopyOfTheData() + throws Exception { + Path status = Paths.get("/proc/self/status"); + assumeTrue("The resident size is read from /proc.", + Files.isReadable(status)); + DeviceDetectionHashEngine engine = getWrapper().getEngine(); + String identifier = engine.getDataFileMetaData().getIdentifier(); + byte[] data = Files.readAllBytes(Paths.get( + engine.getDataFileMetaData().getDataFilePath())); + // The first refreshes from memory settle what the engine keeps. + for (int i = 0; i < 2; i++) { + engine.refreshData(identifier, data); + } + long before = residentBytes(status); + for (int i = 0; i < LEAK_REFRESHES; i++) { + engine.refreshData(identifier, data); + } + long growth = residentBytes(status) - before; + assertTrue(String.format( + "The process grew by %d bytes over %d refreshes from %d bytes " + + "of data, %d bytes a refresh.", + growth, LEAK_REFRESHES, data.length, growth / LEAK_REFRESHES), + growth < 2L * data.length); + } + + /** + * The resident size of this process from its status file. + */ + private static long residentBytes(Path status) throws Exception { + for (String line : Files.readAllLines(status)) { + if (line.startsWith("VmRSS:")) { + return Long.parseLong( + line.replaceAll("[^0-9]", "")) * 1024; + } + } + throw new IllegalStateException("No VmRSS in " + status); + } + /** * A refresh from data that is not a data file fails with an error, and * the engine goes on using the data it had. diff --git a/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/interop/CollectionIndexTests.java b/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/interop/CollectionIndexTests.java new file mode 100644 index 000000000..2758fbc50 --- /dev/null +++ b/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/interop/CollectionIndexTests.java @@ -0,0 +1,77 @@ +/* ********************************************************************* + * This Original Work is copyright of 51 Degrees Mobile Experts Limited. + * Copyright 2026 51 Degrees Mobile Experts Limited, Davidson House, + * Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU. + * + * This Original Work is licensed under the European Union Public Licence + * (EUPL) v.1.2 and is subject to its terms as set out below. + * + * If a copy of the EUPL was not distributed with this file, You can obtain + * one at https://opensource.org/licenses/EUPL-1.2. + * + * The 'Compatible Licences' set out in the Appendix to the EUPL (as may be + * amended by the European Commission) shall be deemed incompatible for + * the purposes of the Work and the provisions of the compatibility + * clause in Article 5 of the EUPL shall not apply. + * + * If using the Work as, or as part of, a network application, by + * including the attribution notice(s) required under Article 5 of the EUPL + * in the end user terms of the application under an appropriate heading, + * such notice(s) shall fulfill the requirements of that article. + * ********************************************************************* */ + +package fiftyone.devicedetection.hash.engine.onpremise.interop; + +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.ComponentMetaDataCollectionSwig; +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.ComponentMetaDataSwig; +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.ConfigHashSwig; +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.EngineHashSwig; +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.MetaDataSwig; +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.PropertyMetaDataCollectionSwig; +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.RequiredPropertiesConfigSwig; +import fiftyone.devicedetection.shared.testhelpers.TestFileUtils; +import org.junit.Test; + +import java.io.File; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; + +/** + * Reading a native collection past its end throws a Java exception, as the + * C++ exception that the read throws is turned into one. + */ +public class CollectionIndexTests { + + @Test + public void PropertiesForComponent_IndexPastTheEnd_Throws() { + File file = TestFileUtils.getHashFile(); + assertNotNull("The test needs the free Lite data file, which the " + + "build fetches into cxx/data.", file); + ConfigHashSwig config = new ConfigHashSwig(); + RequiredPropertiesConfigSwig required = + new RequiredPropertiesConfigSwig(); + EngineHashSwig engine = + new EngineHashSwig(file.getAbsolutePath(), config, required); + try { + MetaDataSwig metaData = engine.getMetaData(); + ComponentMetaDataCollectionSwig components = + metaData.getComponents(); + ComponentMetaDataSwig component = components.getByIndex(0); + PropertyMetaDataCollectionSwig properties = + metaData.getPropertiesForComponent(component); + long size = properties.getSize(); + assertTrue(size > 0); + assertThrows(RuntimeException.class, + () -> properties.getByIndex(size)); + properties.delete(); + component.delete(); + components.delete(); + } finally { + engine.delete(); + required.delete(); + config.delete(); + } + } +} diff --git a/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/interop/NullStringTests.java b/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/interop/NullStringTests.java new file mode 100644 index 000000000..f5c3c7217 --- /dev/null +++ b/device-detection/device-detection.hash.engine.on-premise/src/test/java/fiftyone/devicedetection/hash/engine/onpremise/interop/NullStringTests.java @@ -0,0 +1,61 @@ +/* ********************************************************************* + * This Original Work is copyright of 51 Degrees Mobile Experts Limited. + * Copyright 2026 51 Degrees Mobile Experts Limited, Davidson House, + * Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU. + * + * This Original Work is licensed under the European Union Public Licence + * (EUPL) v.1.2 and is subject to its terms as set out below. + * + * If a copy of the EUPL was not distributed with this file, You can obtain + * one at https://opensource.org/licenses/EUPL-1.2. + * + * The 'Compatible Licences' set out in the Appendix to the EUPL (as may be + * amended by the European Commission) shall be deemed incompatible for + * the purposes of the Work and the provisions of the compatibility + * clause in Article 5 of the EUPL shall not apply. + * + * If using the Work as, or as part of, a network application, by + * including the attribution notice(s) required under Article 5 of the EUPL + * in the end user terms of the application under an appropriate heading, + * such notice(s) shall fulfill the requirements of that article. + * ********************************************************************* */ + +package fiftyone.devicedetection.hash.engine.onpremise.interop; + +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.ConfigHashSwig; +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.EngineHashSwig; +import fiftyone.devicedetection.hash.engine.onpremise.interop.swig.RequiredPropertiesConfigSwig; +import fiftyone.devicedetection.shared.testhelpers.TestFileUtils; +import org.junit.Test; + +import java.io.File; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThrows; + +/** + * A null given for a string the native code reads as a C string throws, + * instead of reaching the native code as a null pointer. + */ +public class NullStringTests { + + @Test + public void RefreshData_NullFileName_Throws() { + File file = TestFileUtils.getHashFile(); + assertNotNull("The test needs the free Lite data file, which the " + + "build fetches into cxx/data.", file); + ConfigHashSwig config = new ConfigHashSwig(); + RequiredPropertiesConfigSwig required = + new RequiredPropertiesConfigSwig(); + EngineHashSwig engine = + new EngineHashSwig(file.getAbsolutePath(), config, required); + try { + assertThrows(NullPointerException.class, + () -> engine.refreshData((String) null)); + } finally { + engine.delete(); + required.delete(); + config.delete(); + } + } +} diff --git a/ip-intelligence/ip-intelligence.engine.on-premise/src/main/cxx/Java_Ipi_Engine.cpp b/ip-intelligence/ip-intelligence.engine.on-premise/src/main/cxx/Java_Ipi_Engine.cpp index 884f24c53..c29dbab31 100644 --- a/ip-intelligence/ip-intelligence.engine.on-premise/src/main/cxx/Java_Ipi_Engine.cpp +++ b/ip-intelligence/ip-intelligence.engine.on-premise/src/main/cxx/Java_Ipi_Engine.cpp @@ -310,6 +310,10 @@ template T SwigValueInit() { #include +#include +#include + + #include "cxx/src/ipi/EngineIpi.hpp" using namespace FiftyoneDegrees::Common; @@ -452,6 +456,10 @@ SWIGINTERN void std_vector_Sl_std_string_Sg__doRemoveRange(std::vector< std::str } } +#include +#include + + SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) { SWIG_JavaExceptionCodes exception_code = SWIG_JavaUnknownError; switch(code) { @@ -1139,6 +1147,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -1375,6 +1388,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -1726,6 +1744,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -1785,6 +1808,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -1849,6 +1877,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -1916,6 +1949,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1); @@ -1978,6 +2016,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -2040,6 +2083,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -2101,6 +2149,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -2165,6 +2218,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -2229,6 +2287,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -2293,6 +2356,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -2354,6 +2422,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -2413,6 +2486,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -2477,6 +2555,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -2541,6 +2624,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -2605,6 +2693,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -2666,6 +2759,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -2725,6 +2823,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -2789,6 +2892,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -2853,6 +2961,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -2917,6 +3030,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -2978,6 +3096,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -3037,6 +3160,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -3101,6 +3229,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -3165,6 +3298,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -3229,6 +3367,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -3290,6 +3433,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -3349,6 +3497,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -3413,6 +3566,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -3477,6 +3635,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -3541,6 +3704,11 @@ SWIGEXPORT jdouble JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jdouble)result; return jresult; @@ -3602,6 +3770,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -3661,6 +3834,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -3723,6 +3901,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -3797,6 +3980,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -3861,6 +4049,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -3927,6 +4120,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -4001,6 +4199,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< std::string > > * >(new Value< std::vector< std::string > >(result)); return jresult; @@ -4067,6 +4270,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< std::string > > * >(new Value< std::vector< std::string > >(result)); return jresult; @@ -4141,6 +4349,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::string > * >(new Value< std::string >(result)); return jresult; @@ -4207,6 +4420,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::string > * >(new Value< std::string >(result)); return jresult; @@ -4281,6 +4499,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); return jresult; @@ -4347,6 +4570,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); return jresult; @@ -4421,6 +4649,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); return jresult; @@ -4487,6 +4720,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); return jresult; @@ -4561,6 +4799,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); return jresult; @@ -4627,6 +4870,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); return jresult; @@ -4701,6 +4949,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); return jresult; @@ -4767,6 +5020,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); return jresult; @@ -4841,6 +5099,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); return jresult; @@ -4907,6 +5170,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); return jresult; @@ -4981,6 +5249,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); return jresult; @@ -5047,6 +5320,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); return jresult; @@ -5111,6 +5389,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -5175,6 +5458,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -5239,6 +5527,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -5300,6 +5593,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -5362,6 +5660,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5426,6 +5729,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -5490,6 +5798,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5554,6 +5867,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5618,6 +5936,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -5682,6 +6005,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5746,6 +6074,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -5810,6 +6143,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5874,6 +6212,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -5938,6 +6281,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -6002,6 +6350,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -6066,6 +6419,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -6130,6 +6488,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -6191,6 +6554,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6253,6 +6621,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -6317,6 +6690,11 @@ SWIGEXPORT int JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_swi SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (int)result; return jresult; @@ -6381,6 +6759,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -6442,6 +6825,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6504,6 +6892,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -6565,6 +6958,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6624,6 +7022,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -6692,6 +7095,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -6756,6 +7164,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -6818,6 +7231,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -6888,6 +7306,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -6957,6 +7380,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -7029,6 +7457,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -7096,6 +7529,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -7162,6 +7600,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -7233,6 +7676,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -7302,6 +7750,11 @@ SWIGEXPORT jshort JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jshort)result; return jresult; @@ -7373,6 +7826,11 @@ SWIGEXPORT jshort JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jshort)*result; return jresult; @@ -7448,6 +7906,11 @@ SWIGEXPORT jshort JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jshort)result; return jresult; @@ -7519,6 +7982,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -7596,6 +8064,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; { @@ -7663,6 +8136,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -7740,6 +8218,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -7751,6 +8234,7 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s std::string arg1 ; unsigned char *arg2 = (unsigned char *)0 ; long arg3 ; + std::unique_ptr< unsigned char [] > buffer2 ; ValueMetaDataKey *result = 0 ; (void)jenv; @@ -7764,34 +8248,28 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s (&arg1)->assign(arg1_pstr); jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg2 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg2); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg2 = (unsigned char*)malloc(arrSize); - if (arg2 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer2.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer2) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return 0; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg2, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return 0; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg2, data, arrSize); - jenv->ReleaseByteArrayElements(jarg2, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg2, + 0, + (jsize)arrSize, + reinterpret_cast(buffer2.get())); + arg2 = buffer2.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -7849,6 +8327,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); @@ -7914,6 +8397,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -7978,6 +8466,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -8039,6 +8532,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8101,6 +8599,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -8165,6 +8668,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -8229,6 +8737,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -8293,6 +8806,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< uint8_t > * >(new std::vector< uint8_t >(result)); return jresult; @@ -8354,6 +8872,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8413,6 +8936,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8479,6 +9007,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); @@ -8546,6 +9079,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8610,6 +9148,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -8671,6 +9214,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8742,6 +9290,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8808,6 +9361,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -8872,6 +9430,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -8933,6 +9496,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -8997,6 +9565,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9063,6 +9636,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9127,6 +9705,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -9188,6 +9771,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -9259,6 +9847,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9325,6 +9918,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9389,6 +9987,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -9450,6 +10053,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -9512,6 +10120,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9576,6 +10189,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9640,6 +10258,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9704,6 +10327,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9771,6 +10399,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9838,6 +10471,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9905,6 +10543,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -9972,6 +10615,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10039,6 +10687,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10106,6 +10759,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10173,6 +10831,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10240,6 +10903,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10301,6 +10969,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10371,6 +11044,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10441,6 +11119,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10503,6 +11186,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10567,6 +11255,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -10634,6 +11327,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -10696,6 +11394,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10713,6 +11416,12 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2) return ; } + + if (!arg2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "The file name is null"); + return ; + } + { try { (arg1)->refreshData((char const *)arg2);; @@ -10762,6 +11471,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); } @@ -10771,40 +11485,35 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw EngineBase *arg1 = 0 ; unsigned char *arg2 = (unsigned char *)0 ; long arg3 ; + std::unique_ptr< unsigned char [] > buffer2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = fiftyoneFromJlong< EngineBase * >(jarg1); { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg2 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg2); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg2 = (unsigned char*)malloc(arrSize); - if (arg2 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer2.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer2) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return ; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg2, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return ; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg2, data, arrSize); - jenv->ReleaseByteArrayElements(jarg2, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg2, + 0, + (jsize)arrSize, + reinterpret_cast(buffer2.get())); + arg2 = buffer2.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -10862,6 +11571,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -10925,6 +11639,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -10989,6 +11708,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -11053,6 +11777,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -11117,6 +11846,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -11181,6 +11915,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -11245,6 +11984,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -11309,6 +12053,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -11373,6 +12122,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -11437,6 +12191,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -11501,6 +12260,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -11565,6 +12329,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -11636,6 +12405,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11698,6 +12472,11 @@ SWIGEXPORT jfloat JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jfloat)result; return jresult; @@ -11762,6 +12541,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -11826,6 +12610,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11885,6 +12674,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -11947,6 +12741,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< uint8_t > * >(new std::vector< uint8_t >(result)); return jresult; @@ -12018,6 +12817,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12080,6 +12884,11 @@ SWIGEXPORT jfloat JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jfloat)result; return jresult; @@ -12144,6 +12953,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -12208,6 +13022,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12267,6 +13086,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12329,6 +13153,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -12393,6 +13222,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12455,6 +13289,11 @@ SWIGEXPORT jfloat JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jfloat)result; return jresult; @@ -12519,6 +13358,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -12583,6 +13427,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12642,6 +13491,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12704,6 +13558,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -12768,6 +13627,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -12830,6 +13694,11 @@ SWIGEXPORT jfloat JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jfloat)result; return jresult; @@ -12894,6 +13763,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -12958,6 +13832,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -13017,6 +13896,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -13079,6 +13963,11 @@ SWIGEXPORT jdouble JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jdouble)result; return jresult; @@ -13143,6 +14032,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -13205,6 +14099,11 @@ SWIGEXPORT jfloat JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_ SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jfloat)result; return jresult; @@ -13269,6 +14168,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13333,6 +14237,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -13392,6 +14301,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -13451,6 +14365,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13512,6 +14431,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13573,6 +14497,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13583,39 +14512,34 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s jlong jresult = 0 ; unsigned char *arg1 = (unsigned char *)0 ; fiftyoneDegreesIpType arg2 ; + std::unique_ptr< unsigned char [] > buffer1 ; IpAddress *result = 0 ; (void)jenv; (void)jcls; { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg1 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg1); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg1 = (unsigned char*)malloc(arrSize); - if (arg1 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer1.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer1) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return 0; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg1, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return 0; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg1, data, arrSize); - jenv->ReleaseByteArrayElements(jarg1, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg1, + 0, + (jsize)arrSize, + reinterpret_cast(buffer1.get())); + arg1 = buffer1.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -13673,6 +14597,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); @@ -13692,6 +14621,12 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0); if (!arg1) return 0; } + + if (!arg1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "The IP address is null"); + return 0; + } + { try { result = (IpAddress *)new IpAddress((char const *)arg1);; @@ -13741,6 +14676,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1); @@ -13752,40 +14692,35 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw IpAddress *arg1 = 0 ; unsigned char *arg2 = (unsigned char *)0 ; uint32_t arg3 ; + std::unique_ptr< unsigned char [] > buffer2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = fiftyoneFromJlong< IpAddress * >(jarg1); { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg2 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg2); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg2 = (unsigned char*)malloc(arrSize); - if (arg2 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer2.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer2) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return ; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg2, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return ; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg2, data, arrSize); - jenv->ReleaseByteArrayElements(jarg2, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg2, + 0, + (jsize)arrSize, + reinterpret_cast(buffer2.get())); + arg2 = buffer2.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -13843,6 +14778,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -13906,6 +14846,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -13967,6 +14912,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14026,6 +14976,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -14094,6 +15049,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -14158,6 +15118,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -14220,6 +15185,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14293,6 +15263,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -14362,6 +15337,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -14434,6 +15414,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14501,6 +15486,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -14565,9 +15555,14 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; }; } - catch(invalid_argument& e) { + catch(invalid_argument& e) { + { + SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; + }; + } + catch(std::exception& e) { { - SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; }; } } @@ -14644,6 +15639,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14713,6 +15713,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< std::string > >::value_type * >(new std::vector< WeightedValue< std::string > >::value_type(result)); return jresult; @@ -14784,6 +15789,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -14862,6 +15872,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< std::string > >::value_type * >(new std::vector< WeightedValue< std::string > >::value_type(result)); return jresult; @@ -14933,6 +15948,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -14992,6 +16012,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15051,6 +16076,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -15119,6 +16149,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -15183,6 +16218,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -15245,6 +16285,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15318,6 +16363,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -15387,6 +16437,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -15459,6 +16514,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15526,6 +16586,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -15595,6 +16660,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15669,6 +16739,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -15738,6 +16813,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< std::vector< unsigned char > > >::value_type * >(new std::vector< WeightedValue< std::vector< unsigned char > > >::value_type(result)); return jresult; @@ -15809,6 +16889,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -15887,6 +16972,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< std::vector< unsigned char > > >::value_type * >(new std::vector< WeightedValue< std::vector< unsigned char > > >::value_type(result)); return jresult; @@ -15958,6 +17048,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16017,6 +17112,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16076,6 +17176,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -16144,6 +17249,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -16208,6 +17318,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -16270,6 +17385,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16343,6 +17463,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -16412,6 +17537,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -16484,6 +17614,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16551,6 +17686,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -16620,6 +17760,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16694,6 +17839,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -16763,6 +17913,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< bool > >::value_type * >(new std::vector< WeightedValue< bool > >::value_type(result)); return jresult; @@ -16834,6 +17989,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -16912,6 +18072,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< bool > >::value_type * >(new std::vector< WeightedValue< bool > >::value_type(result)); return jresult; @@ -16983,6 +18148,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17042,6 +18212,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17101,6 +18276,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -17169,6 +18349,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -17233,6 +18418,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -17295,6 +18485,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17368,6 +18563,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -17437,6 +18637,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -17509,6 +18714,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17576,6 +18786,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -17645,6 +18860,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17719,6 +18939,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -17788,6 +19013,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< int > >::value_type * >(new std::vector< WeightedValue< int > >::value_type(result)); return jresult; @@ -17859,6 +19089,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -17937,6 +19172,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< int > >::value_type * >(new std::vector< WeightedValue< int > >::value_type(result)); return jresult; @@ -18008,6 +19248,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18067,6 +19312,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18126,6 +19376,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18194,6 +19449,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18258,6 +19518,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -18320,6 +19585,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18393,6 +19663,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -18462,6 +19737,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -18534,6 +19814,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18601,6 +19886,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = result; return jresult; @@ -18670,6 +19960,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18744,6 +20039,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -18813,6 +20113,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< double > >::value_type * >(new std::vector< WeightedValue< double > >::value_type(result)); return jresult; @@ -18879,9 +20184,14 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; }; } - catch(invalid_argument& e) { + catch(invalid_argument& e) { + { + SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; + }; + } + catch(std::exception& e) { { - SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; }; } } @@ -18962,6 +20272,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< double > >::value_type * >(new std::vector< WeightedValue< double > >::value_type(result)); return jresult; @@ -19033,6 +20348,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -19092,6 +20412,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -19151,6 +20476,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -19215,6 +20545,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -19279,6 +20614,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -19343,6 +20683,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< std::string > > * >(new std::vector< WeightedValue< std::string > >(result)); return jresult; @@ -19404,6 +20749,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -19463,6 +20813,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -19527,6 +20882,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -19591,6 +20951,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -19655,6 +21020,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< std::vector< uint8_t > > > * >(new std::vector< WeightedValue< std::vector< uint8_t > > >(result)); return jresult; @@ -19716,6 +21086,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -19775,6 +21150,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -19839,6 +21219,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -19903,6 +21288,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -19967,6 +21357,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< bool > > * >(new std::vector< WeightedValue< bool > >(result)); return jresult; @@ -20028,6 +21423,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -20087,6 +21487,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -20151,6 +21556,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -20215,6 +21625,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -20279,6 +21694,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< int > > * >(new std::vector< WeightedValue< int > >(result)); return jresult; @@ -20340,6 +21760,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -20399,6 +21824,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -20463,6 +21893,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -20527,6 +21962,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -20591,6 +22031,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< WeightedValue< double > > * >(new std::vector< WeightedValue< double > >(result)); return jresult; @@ -20652,6 +22097,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -20711,6 +22161,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -20775,6 +22230,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -20839,6 +22299,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -20903,6 +22368,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< IpAddress * >(new IpAddress(result)); return jresult; @@ -20964,6 +22434,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -21023,6 +22498,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -21087,6 +22567,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -21151,6 +22636,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; @@ -21215,6 +22705,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< uint8_t > * >(new std::vector< uint8_t >(result)); return jresult; @@ -21276,6 +22771,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -21335,6 +22835,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -21407,6 +22912,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< std::string > > > * >(new Value< std::vector< WeightedValue< std::string > > >(result)); return jresult; @@ -21473,6 +22983,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< std::string > > > * >(new Value< std::vector< WeightedValue< std::string > > >(result)); return jresult; @@ -21547,6 +23062,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< std::vector< uint8_t > > > > * >(new Value< std::vector< WeightedValue< std::vector< uint8_t > > > >(result)); return jresult; @@ -21613,6 +23133,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< std::vector< uint8_t > > > > * >(new Value< std::vector< WeightedValue< std::vector< uint8_t > > > >(result)); return jresult; @@ -21687,6 +23212,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< uint8_t > > * >(new Value< std::vector< uint8_t > >(result)); return jresult; @@ -21753,6 +23283,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< uint8_t > > * >(new Value< std::vector< uint8_t > >(result)); return jresult; @@ -21829,6 +23364,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< std::string > > > * >(new Value< std::vector< WeightedValue< std::string > > >(result)); return jresult; @@ -21897,6 +23437,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< std::string > > > * >(new Value< std::vector< WeightedValue< std::string > > >(result)); return jresult; @@ -21971,6 +23516,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< bool > > > * >(new Value< std::vector< WeightedValue< bool > > >(result)); return jresult; @@ -22037,6 +23587,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< bool > > > * >(new Value< std::vector< WeightedValue< bool > > >(result)); return jresult; @@ -22111,6 +23666,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< int > > > * >(new Value< std::vector< WeightedValue< int > > >(result)); return jresult; @@ -22177,6 +23737,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< int > > > * >(new Value< std::vector< WeightedValue< int > > >(result)); return jresult; @@ -22251,6 +23816,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< double > > > * >(new Value< std::vector< WeightedValue< double > > >(result)); return jresult; @@ -22317,6 +23887,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< WeightedValue< double > > > * >(new Value< std::vector< WeightedValue< double > > >(result)); return jresult; @@ -22391,6 +23966,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< IpAddress > * >(new Value< IpAddress >(result)); return jresult; @@ -22457,6 +24037,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< IpAddress > * >(new Value< IpAddress >(result)); return jresult; @@ -22521,6 +24106,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< IpAddress > * >(new Value< IpAddress >(result)); return jresult; @@ -22602,6 +24192,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; { @@ -22669,6 +24264,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -22731,6 +24331,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -22793,6 +24398,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -22855,6 +24465,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -22924,6 +24539,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -22981,9 +24601,14 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; }; } - catch(invalid_argument& e) { + catch(invalid_argument& e) { + { + SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; + }; + } + catch(std::exception& e) { { - SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; }; } } @@ -23050,6 +24675,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -23114,6 +24744,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; return jresult; @@ -23178,6 +24813,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< std::vector< std::string > * >(new std::vector< std::string >(result)); return jresult; @@ -23242,6 +24882,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -23303,6 +24948,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -23367,6 +25017,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -23429,6 +25084,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -23491,6 +25151,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -23553,6 +25218,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -23617,6 +25287,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -23681,6 +25356,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jlong)result; return jresult; @@ -23742,6 +25422,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -23801,6 +25486,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -23863,6 +25553,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -23923,6 +25618,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -23983,6 +25683,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -24043,6 +25748,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -24103,6 +25813,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -24165,6 +25880,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -24227,6 +25947,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24291,6 +26016,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24355,6 +26085,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24419,6 +26154,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24483,6 +26223,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24547,6 +26292,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24611,6 +26361,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24675,6 +26430,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24739,6 +26499,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24803,6 +26568,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24867,6 +26637,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -24931,6 +26706,11 @@ SWIGEXPORT jint JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jint)result; return jresult; @@ -24992,6 +26772,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -25051,6 +26836,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -25112,6 +26902,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -25171,6 +26966,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -25232,6 +27032,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -25307,6 +27112,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -25319,6 +27129,7 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s long arg2 ; ConfigIpi *arg3 = 0 ; RequiredPropertiesConfig *arg4 = 0 ; + std::unique_ptr< unsigned char [] > buffer1 ; EngineIpi *result = 0 ; (void)jenv; @@ -25326,34 +27137,28 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s (void)jarg3_; (void)jarg4_; { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg1 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg1); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg1 = (unsigned char*)malloc(arrSize); - if (arg1 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer1.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer1) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return 0; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg1, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return 0; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg1, data, arrSize); - jenv->ReleaseByteArrayElements(jarg1, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg1, + 0, + (jsize)arrSize, + reinterpret_cast(buffer1.get())); + arg1 = buffer1.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -25413,6 +27218,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); @@ -25478,6 +27288,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -25542,6 +27357,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -25613,6 +27433,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Date * >(new Date(result)); return jresult; @@ -25684,6 +27509,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -25748,6 +27578,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -25812,6 +27647,11 @@ SWIGEXPORT jstring JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = jenv->NewStringUTF((&result)->c_str()); return jresult; @@ -25874,6 +27714,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -25891,6 +27736,12 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0); if (!arg2) return ; } + + if (!arg2) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "The file name is null"); + return ; + } + { try { (arg1)->refreshData((char const *)arg2);; @@ -25940,6 +27791,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); } @@ -25949,40 +27805,35 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw EngineIpi *arg1 = 0 ; unsigned char *arg2 = (unsigned char *)0 ; long arg3 ; + std::unique_ptr< unsigned char [] > buffer2 ; (void)jenv; (void)jcls; (void)jarg1_; arg1 = fiftyoneFromJlong< EngineIpi * >(jarg1); { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg2 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg2); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg2 = (unsigned char*)malloc(arrSize); - if (arg2 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer2.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer2) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return ; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg2, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return ; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg2, data, arrSize); - jenv->ReleaseByteArrayElements(jarg2, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg2, + 0, + (jsize)arrSize, + reinterpret_cast(buffer2.get())); + arg2 = buffer2.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -26040,6 +27891,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -26106,6 +27962,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -26176,6 +28037,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); @@ -26189,6 +28055,7 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s unsigned char *arg2 = (unsigned char *)0 ; long arg3 ; fiftyoneDegreesIpType arg4 ; + std::unique_ptr< unsigned char [] > buffer2 ; ResultsIpi *result = 0 ; (void)jenv; @@ -26196,34 +28063,28 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s (void)jarg1_; arg1 = fiftyoneFromJlong< EngineIpi * >(jarg1); { - /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,28,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; + /*@SWIG:../../../../../cxx/src/common/JavaTypes.i,33,JAVA_UBYTE_ARR_TYPEMAP_BODY@*/ long arrSize = 0; if (jarg2 != NULL) { // Get the number of bytes in the byte array. arrSize = jenv->GetArrayLength(jarg2); - // Allocate memory for the destination byte array used internally by - // the data set. This memory is required for the lifetime of the data - // set. - arg2 = (unsigned char*)malloc(arrSize); - if (arg2 == NULL) { + // Copy the byte array into memory that is freed when the call + // returns, by any way it returns. The C++ code copies anything it + // keeps. The copy has a byte more than the array, so an empty array + // is never passed as null. + buffer2.reset(new (std::nothrow) unsigned char[(size_t)arrSize + 1]); + if (!buffer2) { SWIG_JavaThrowException( jenv, - SWIG_JavaRuntimeException, + SWIG_JavaOutOfMemoryError, "Failed to allocate memory to copy the input byte array."); return 0; } - // Attempt to get a pointer to the data within the jbyteArray. - jbyte* data = jenv->GetByteArrayElements(jarg2, NULL); - if (data == NULL) { - SWIG_JavaThrowException( - jenv, - SWIG_JavaRuntimeException, - "Failed to obtain pointer to the input byte array."); - return 0; - } - // Copy the input byte array to the destination and release the - // reference to source pointer. - memcpy(arg2, data, arrSize); - jenv->ReleaseByteArrayElements(jarg2, data, JNI_ABORT); + jenv->GetByteArrayRegion( + jarg2, + 0, + (jsize)arrSize, + reinterpret_cast(buffer2.get())); + arg2 = buffer2.get(); } else { // Let the underlying C implementation throw the null pointer exception. @@ -26282,6 +28143,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); @@ -26350,6 +28216,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong(result); return jresult; @@ -26411,6 +28282,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } } @@ -26493,6 +28369,11 @@ SWIGEXPORT void JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_sw SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return ; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return ; + }; + } } { if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); @@ -26574,6 +28455,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::string > * >(new Value< std::string >(result)); { @@ -26653,6 +28539,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< std::vector< std::string > > * >(new Value< std::vector< std::string > >(result)); { @@ -26732,6 +28623,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< bool > * >(new Value< bool >(result)); { @@ -26811,6 +28707,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< int > * >(new Value< int >(result)); { @@ -26890,6 +28791,11 @@ SWIGEXPORT jlong JNICALL Java_fiftyone_ipintelligence_engine_onpremise_interop_s SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = fiftyoneToJlong< Value< double > * >(new Value< double >(result)); { @@ -26969,6 +28875,11 @@ SWIGEXPORT jboolean JNICALL Java_fiftyone_ipintelligence_engine_onpremise_intero SWIG_JavaException(jenv, SWIG_ValueError, e.what()); return 0; }; } + catch(std::exception& e) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, e.what()); return 0; + }; + } } jresult = (jboolean)result; { diff --git a/ip-intelligence/ip-intelligence.engine.on-premise/src/main/cxx/hash_java.i b/ip-intelligence/ip-intelligence.engine.on-premise/src/main/cxx/hash_java.i index e0f8d378c..043417388 100644 --- a/ip-intelligence/ip-intelligence.engine.on-premise/src/main/cxx/hash_java.i +++ b/ip-intelligence/ip-intelligence.engine.on-premise/src/main/cxx/hash_java.i @@ -238,6 +238,24 @@ nofinalize(EvidenceIpi); nofinalize(ResultsIpi); +/* A null file name would reach the native code as a null C string, which it + reads without a check. It throws a NullPointerException instead. */ +%typemap(check) const char *fileName %{ + if (!$1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "The file name is null"); + return $null; + } +%} + +/* A null IP address would reach the native code as a null C string, which + it reads without a check. It throws a NullPointerException instead. */ +%typemap(check) const char *ipAddressString %{ + if (!$1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "The IP address is null"); + return $null; + } +%} + %include "cxx/src/ipi/ipi.i" /* Avoid copying the key and value character by character and pass a pointer instead. */ diff --git a/ip-intelligence/ip-intelligence.engine.on-premise/src/test/java/fiftyone/ipintelligence/engine/onpremise/interop/CollectionIndexTests.java b/ip-intelligence/ip-intelligence.engine.on-premise/src/test/java/fiftyone/ipintelligence/engine/onpremise/interop/CollectionIndexTests.java new file mode 100644 index 000000000..402258e1b --- /dev/null +++ b/ip-intelligence/ip-intelligence.engine.on-premise/src/test/java/fiftyone/ipintelligence/engine/onpremise/interop/CollectionIndexTests.java @@ -0,0 +1,82 @@ +/* ********************************************************************* + * This Original Work is copyright of 51 Degrees Mobile Experts Limited. + * Copyright 2026 51 Degrees Mobile Experts Limited, Davidson House, + * Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU. + * + * This Original Work is licensed under the European Union Public Licence + * (EUPL) v.1.2 and is subject to its terms as set out below. + * + * If a copy of the EUPL was not distributed with this file, You can obtain + * one at https://opensource.org/licenses/EUPL-1.2. + * + * The 'Compatible Licences' set out in the Appendix to the EUPL (as may be + * amended by the European Commission) shall be deemed incompatible for + * the purposes of the Work and the provisions of the compatibility + * clause in Article 5 of the EUPL shall not apply. + * + * If using the Work as, or as part of, a network application, by + * including the attribution notice(s) required under Article 5 of the EUPL + * in the end user terms of the application under an appropriate heading, + * such notice(s) shall fulfill the requirements of that article. + * ********************************************************************* */ + +package fiftyone.ipintelligence.engine.onpremise.interop; + +import fiftyone.ipintelligence.engine.onpremise.interop.swig.ComponentMetaDataCollectionSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.ComponentMetaDataSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.ConfigIpiSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.EngineIpiSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.MetaDataSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.PropertyMetaDataCollectionSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.RequiredPropertiesConfigSwig; +import org.junit.Test; + +import java.io.File; + +import static fiftyone.ipintelligence.shared.testhelpers.FileUtils.LITE_IPI_DATA_FILE_NAME; +import static fiftyone.pipeline.util.FileFinder.getFilePath; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; + +/** + * Reading a native collection past its end throws a Java exception, as the + * C++ exception that the read throws is turned into one. + */ +public class CollectionIndexTests { + + @Test + public void PropertiesForComponent_IndexPastTheEnd_Throws() { + File file; + try { + file = getFilePath(LITE_IPI_DATA_FILE_NAME); + } catch (IllegalArgumentException e) { + throw new AssertionError("The test needs the free Lite data " + + "file, which the build fetches into cxx/data.", e); + } + ConfigIpiSwig config = new ConfigIpiSwig(); + config.setLowMemory(); + RequiredPropertiesConfigSwig required = + new RequiredPropertiesConfigSwig(); + EngineIpiSwig engine = + new EngineIpiSwig(file.getAbsolutePath(), config, required); + try { + MetaDataSwig metaData = engine.getMetaData(); + ComponentMetaDataCollectionSwig components = + metaData.getComponents(); + ComponentMetaDataSwig component = components.getByIndex(0); + PropertyMetaDataCollectionSwig properties = + metaData.getPropertiesForComponent(component); + long size = properties.getSize(); + assertTrue(size > 0); + assertThrows(RuntimeException.class, + () -> properties.getByIndex(size)); + properties.delete(); + component.delete(); + components.delete(); + } finally { + engine.delete(); + required.delete(); + config.delete(); + } + } +} diff --git a/ip-intelligence/ip-intelligence.engine.on-premise/src/test/java/fiftyone/ipintelligence/engine/onpremise/interop/NullStringTests.java b/ip-intelligence/ip-intelligence.engine.on-premise/src/test/java/fiftyone/ipintelligence/engine/onpremise/interop/NullStringTests.java new file mode 100644 index 000000000..39e71c469 --- /dev/null +++ b/ip-intelligence/ip-intelligence.engine.on-premise/src/test/java/fiftyone/ipintelligence/engine/onpremise/interop/NullStringTests.java @@ -0,0 +1,73 @@ +/* ********************************************************************* + * This Original Work is copyright of 51 Degrees Mobile Experts Limited. + * Copyright 2026 51 Degrees Mobile Experts Limited, Davidson House, + * Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU. + * + * This Original Work is licensed under the European Union Public Licence + * (EUPL) v.1.2 and is subject to its terms as set out below. + * + * If a copy of the EUPL was not distributed with this file, You can obtain + * one at https://opensource.org/licenses/EUPL-1.2. + * + * The 'Compatible Licences' set out in the Appendix to the EUPL (as may be + * amended by the European Commission) shall be deemed incompatible for + * the purposes of the Work and the provisions of the compatibility + * clause in Article 5 of the EUPL shall not apply. + * + * If using the Work as, or as part of, a network application, by + * including the attribution notice(s) required under Article 5 of the EUPL + * in the end user terms of the application under an appropriate heading, + * such notice(s) shall fulfill the requirements of that article. + * ********************************************************************* */ + +package fiftyone.ipintelligence.engine.onpremise.interop; + +import fiftyone.ipintelligence.engine.onpremise.interop.swig.ConfigIpiSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.EngineIpiSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.IpAddressSwig; +import fiftyone.ipintelligence.engine.onpremise.interop.swig.RequiredPropertiesConfigSwig; +import org.junit.Test; + +import java.io.File; + +import static fiftyone.ipintelligence.shared.testhelpers.FileUtils.LITE_IPI_DATA_FILE_NAME; +import static fiftyone.pipeline.util.FileFinder.getFilePath; +import static org.junit.Assert.assertThrows; + +/** + * A null given for a string the native code reads as a C string throws, + * instead of reaching the native code as a null pointer. + */ +public class NullStringTests { + + @Test + public void IpAddress_NullString_Throws() { + assertThrows(NullPointerException.class, + () -> new IpAddressSwig((String) null)); + } + + @Test + public void RefreshData_NullFileName_Throws() { + File file; + try { + file = getFilePath(LITE_IPI_DATA_FILE_NAME); + } catch (IllegalArgumentException e) { + throw new AssertionError("The test needs the free Lite data " + + "file, which the build fetches into cxx/data.", e); + } + ConfigIpiSwig config = new ConfigIpiSwig(); + config.setLowMemory(); + RequiredPropertiesConfigSwig required = + new RequiredPropertiesConfigSwig(); + EngineIpiSwig engine = + new EngineIpiSwig(file.getAbsolutePath(), config, required); + try { + assertThrows(NullPointerException.class, + () -> engine.refreshData((String) null)); + } finally { + engine.delete(); + required.delete(); + config.delete(); + } + } +}