*/
#include "Internal.h"
+#include <errno.h>
#ifdef DMALLOC
#include "dmalloc.h"
#endif
-extern int errno;
-
#ifndef LIBJUAFS
// user class and fields //
jclass userCls = 0;
if( *excCls == 0 ) {
*excCls = (*env)->NewGlobalRef(env, (*env)->FindClass(env, excClsName ));
if( !*excCls ) {
- fprintf(stderr, "ERROR: Internal::throwException()\n
- Cannot find class: %s\n", excClsName);
+ fprintf(stderr, "ERROR: Internal::throwException()\n Cannot find class: %s\n", excClsName);
return;
}
*initID = (*env)->GetMethodID( env, *excCls, "<init>", "(I)V" );
if( !*initID ) {
- fprintf(stderr, "ERROR: Internal::throwException()\n
- Cannot find construction method: %s\n",
- excClsName);
+ fprintf(stderr, "ERROR: Internal::throwException()\n Cannot find construction method: %s\n",
+ excClsName);
return;
}
}
exc = (*env)->NewObject( env, *excCls, *initID, code );
if( !exc ) {
- fprintf(stderr, "ERROR: Internal::throwException()\n
- Cannot construct new exception object: %s\n",
+ fprintf(stderr, "ERROR: Internal::throwException()\n Cannot construct new exception object: %s\n",
excClsName);
return;
}
{
jclass excCls = (*env)->FindClass(env, afsExceptionName);
if(excCls == 0) {
- fprintf(stderr, "ERROR: Internal::throwMessageException()\n
- Cannot find class: %s\n", afsExceptionName);
+ fprintf(stderr, "ERROR: Internal::throwMessageException()\n Cannot find class: %s\n", afsExceptionName);
return;
}
(*env)->ThrowNew(env, excCls, msg);
afsExceptionCls = (*env)->FindClass(env, afsExceptionName);
if( !afsExceptionCls ) {
- fprintf(stderr, "ERROR: Internal::throwAFSException()\n
- Cannot find class: %s\n", afsExceptionName);
+ fprintf(stderr, "ERROR: Internal::throwAFSException()\n Cannot find class: %s\n", afsExceptionName);
return;
}
afsExceptionInit = (*env)->GetMethodID( env, afsExceptionCls,
"<init>", "(I)V" );
if( !afsExceptionInit ) {
- fprintf(stderr, "ERROR: Internal::throwAFSException()\n
- Cannot find construction method: %s\n",
+ fprintf(stderr, "ERROR: Internal::throwAFSException()\n Cannot find construction method: %s\n",
afsExceptionName);
return;
}
exc = (*env)->NewObject( env, afsExceptionCls, afsExceptionInit, code );
if( !exc ) {
- fprintf(stderr, "ERROR: Internal::throwAFSException()\n
- Cannot construct new exception object: %s\n",
+ fprintf(stderr, "ERROR: Internal::throwAFSException()\n Cannot construct new exception object: %s\n",
afsExceptionName);
return;
}
afsFileExceptionCls = (*env)->FindClass(env, afsFileExceptionName);
if( !afsFileExceptionCls ) {
- fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n
- Cannot find class: %s\n", afsFileExceptionName);
+ fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n Cannot find class: %s\n", afsFileExceptionName);
return;
}
afsFileExceptionInit = (*env)->GetMethodID( env, afsFileExceptionCls,
"<init>", "(Ljava/lang/String;I)V" );
if( !afsFileExceptionInit ) {
- fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n
- Cannot find construction method: %s\n",
+ fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n Cannot find construction method: %s\n",
afsFileExceptionName);
return;
}
exc = (*env)->NewObject( env, afsFileExceptionCls,
afsFileExceptionInit, msg, code );
if( !exc ) {
- fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n
- Cannot construct new exception object: %s\n",
+ fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n Cannot construct new exception object: %s\n",
afsFileExceptionName);
return;
}
afsSecurityExceptionCls = (*env)->FindClass(env, afsSecurityExceptionName);
if( !afsSecurityExceptionCls ) {
- fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n
- Cannot find class: %s\n", afsSecurityExceptionName);
+ fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n Cannot find class: %s\n", afsSecurityExceptionName);
return;
}
afsSecurityExceptionInit = (*env)->GetMethodID( env, afsSecurityExceptionCls,
"<init>", "(I)V" );
if( !afsSecurityExceptionInit ) {
- fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n
- Cannot find construction method: %s\n",
+ fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n Cannot find construction method: %s\n",
afsSecurityExceptionName);
return;
}
exc = (*env)->NewObject( env, afsSecurityExceptionCls,
afsSecurityExceptionInit, code );
if( !exc ) {
- fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n
- Cannot construct new exception object: %s\n",
+ fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n Cannot construct new exception object: %s\n",
afsSecurityExceptionName);
return;
}