[jboss-cvs] jboss-profiler/jvmti-lib/native-src ...
Clebert Suconic
csuconic at jboss.com
Thu Jul 27 12:00:31 EDT 2006
User: csuconic
Date: 06/07/27 12:00:31
Modified: jvmti-lib/native-src jbossAgentJNI.cpp
Log:
adding error messages case the file can't be opened
Revision Changes Path
1.17 +974 -969 jboss-profiler/jvmti-lib/native-src/jbossAgentJNI.cpp
(In the diff below, changes in quantity of whitespace are not shown.)
Index: jbossAgentJNI.cpp
===================================================================
RCS file: /cvsroot/jboss/jboss-profiler/jvmti-lib/native-src/jbossAgentJNI.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- jbossAgentJNI.cpp 29 May 2006 03:31:34 -0000 1.16
+++ jbossAgentJNI.cpp 27 Jul 2006 16:00:31 -0000 1.17
@@ -250,6 +250,7 @@
iterate.genericCount=0;
iterate.fileObjects = fopen (strObjects,"w+");
if (iterate.fileObjects==NULL) {
+ fprintf (stderr,"couldn't open file %s\n",strObjects);
throwException(env,"java/lang/RuntimeException","Couldn't open objects file");
return;
}
@@ -257,6 +258,7 @@
iterate.fileReferences = fopen (strReferences,"w+");
if (iterate.fileReferences==NULL) {
+ fprintf (stderr,"couldn't open file %s\n",strReferences);
throwException(env,"java/lang/RuntimeException","Couldn't open references file");
return;
}
@@ -264,6 +266,7 @@
iterate.fileClasses = fopen (strClasses,"w+");
if (iterate.fileClasses==NULL) {
+ fprintf (stderr,"couldn't open file %s\n",strClasses);
throwException(env,"java/lang/RuntimeException","Couldn't open classes file");
return;
}
@@ -684,6 +687,7 @@
const char * strTemporaryFile = strTemporaryFile = env->GetStringUTFChars(temporaryFileReferences,NULL);
iterate.fileReferences = fopen(strTemporaryFile,"wb+");
if (iterate.fileReferences==NULL) {
+ fprintf (stderr,"Couldn't open %s\n",strTemporaryFile);
throwException(env,"java/lang/RuntimeException","Couldn't open references file");
return;
}
@@ -699,6 +703,7 @@
const char * strTemporaryFile = strTemporaryFile = env->GetStringUTFChars(temporaryFileObjects,NULL);
iterate.fileObjects = fopen(strTemporaryFile,"wb+");
if (iterate.fileObjects==NULL) {
+ fprintf (stderr,"Couldn't open %s\n",strTemporaryFile);
throwException(env,"java/lang/RuntimeException","Couldn't open objects file");
return;
}
More information about the jboss-cvs-commits
mailing list