-void jxbt_throw_illegal(JNIEnv* env, std::string msg);
-/** Thrown when looking for an host from name does not lead to anything */
-void jxbt_throw_host_not_found(JNIEnv* env, std::string invalid_name);
-/** Thrown when looking for an host from name does not lead to anything */
-void jxbt_throw_process_not_found(JNIEnv* env, std::string invalid_name);
+void jxbt_throw_illegal(JNIEnv* env, const std::string& msg);
+/** Thrown when looking for a host from name does not lead to anything */
+void jxbt_throw_host_not_found(JNIEnv* env, const std::string& invalid_name);
+/** Thrown when looking for a host from name does not lead to anything */
+void jxbt_throw_process_not_found(JNIEnv* env, const std::string& invalid_name);