Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/javahl/native/JNIUtil.h view on Meta::CPAN
* @since 1.4.0
*/
static void enqueueForDeletion(SVNBase *object);
/**
* @deprecated Use the more appropriately named
* enqueueForDeletion() instead.
*/
static void putFinalizedClient(SVNBase *cl);
/**
* Convert any exception that may have been thrown into a textual
* representation. Return @c NULL if no exception has
* occurred. Useful for converting Java @c Exceptions into @c
* svn_error_t's.
*/
static const char *thrownExceptionToCString(SVN::Pool &in_pool);
/**
* Throw a Java exception corresponding to err, and run
* svn_error_clear() on err.
*/
static void handleSVNError(svn_error_t *err);
static jstring makeSVNErrorMessage(svn_error_t *err);
/**
* Create and throw a java.lang.Throwable instance.
*
* @param name The class name (in path form, with slashes in lieu
* of dots) of the Throwable to create and raise.
* @param message The message text of the Throwable.
*/
static void raiseThrowable(const char *name, const char *message);
/**
* Creates and throws a JNIError.
*
* @param message The message text of the JNIError.
*/
static void throwError(const char *message)
{
raiseThrowable(JAVA_PACKAGE"/JNIError", message);
}
static apr_pool_t *getPool();
static bool JNIGlobalInit(JNIEnv *env);
static bool JNIInit(JNIEnv *env);
static bool initializeJNIRuntime();
enum { formatBufferSize = 2048 };
enum { noLog, errorLog, exceptionLog, entryLog } LogLevel;
private:
static void wrappedHandleSVNError(svn_error_t *err);
static void assembleErrorMessage(svn_error_t *err, int depth,
apr_status_t parent_apr_err,
std::string &buffer);
static void putErrorsInTrace(svn_error_t *err,
std::vector<jobject> &stackTrace);
/**
* Set the appropriate global or thread-local flag that an exception
* has been thrown to @a flag.
*/
static void setExceptionThrown(bool flag = true);
/**
* The log level of this module.
*/
static int g_logLevel;
/**
* Global master pool. All other pool are subpools of this pool.
*/
static apr_pool_t *g_pool;
/**
* List of objects finalized, where the C++ peer has not yet be
* deleted.
*/
static std::list<SVNBase*> g_finalizedObjects;
/**
* Mutex to secure the g_finalizedObjects list.
*/
static JNIMutex *g_finalizedObjectsMutex;
/**
* Mutex to secure the access to the log file.
*/
static JNIMutex *g_logMutex;
/**
* Flag, that an exception occurred during our initialization.
*/
static bool g_initException;
/**
* Flag, that one thread is in the init code. Cannot use mutex
* here since apr is not initialized yet.
*/
static bool g_inInit;
/**
* The JNI environment used during initialization.
*/
static JNIEnv *g_initEnv;
/**
* Fuffer the format error messages during initialization.
*/
static char g_initFormatBuffer[formatBufferSize];
/**
* The stream to write log messages to.
*/
static std::ofstream g_logStream;
};
/**
* A statement macro used for checking NULL pointers, in the style of
* SVN_ERR().
( run in 0.305 second using v1.01-cache-2.11-cpan-97f6503c9c8 )