Project

Profile

Help

Revision 5401a5ae

Added by O'Neil Delpratt almost 2 years ago

Saxon/C Development

View differences:

latest9.9/hec/Saxon.C.API/XPathProcessor.cpp
31 31
	SaxonProcessor::sxn_environ->env->CallStaticVoidMethod(cppClass, debugMID, (jboolean)true);
32 32
#endif    
33 33

  
34
	proc->exception = NULL;
34
	exception = NULL;
35 35
	if(!(proc->cwd.empty()) && curr.empty()){
36 36
		cwdXP = proc->cwd;
37 37
	} else {
......
87 87
					SaxonProcessor::sxn_environ->env->NewStringUTF(cwdXP.c_str()),
88 88
					SaxonProcessor::sxn_environ->env->NewStringUTF(xpathStr), stringArray, objectArray));
89 89
	if(!results) {
90
		proc->checkAndCreateException(cppClass);
90
		exception = proc->checkAndCreateException(cppClass);
91 91
		return NULL;
92 92
	}
93 93
	
......
223 223
		//SaxonProcessor::sxn_environ->env->DeleteLocalRef(result);
224 224
		return xdmItem;
225 225
	} else  {
226
		proc->checkAndCreateException(cppClass);
226
			exception = proc->checkAndCreateException(cppClass);
227 227
	   		
228 228
     		}
229 229
}
......
365 365
		SaxonProcessor::sxn_environ->env->DeleteLocalRef(stringArray);
366 366
		SaxonProcessor::sxn_environ->env->DeleteLocalRef(objectArray);
367 367
	}
368
	proc->checkAndCreateException(cppClass);
368
	exception = proc->checkAndCreateException(cppClass);
369 369
	return result;
370 370
}
371 371
return false;
......
450 450
}
451 451

  
452 452
void XPathProcessor::exceptionClear(){
453
	if(proc->exception != NULL) {
453
	if(exception != NULL) {
454 454
		delete proc->exception;
455
		proc->exception = NULL;	
455
		exception = NULL;
456 456
	}
457 457

  
458 458
   SaxonProcessor::sxn_environ->env->ExceptionClear();
459 459
 
460 460
}
461 461

  
462
int XPathProcessor::exceptionCount(){
463
 if(proc->exception != NULL){
464
 return proc->exception->count();
465
 }
466
 return 0;
467
 }
468

  
469
const char * XPathProcessor::getErrorCode(int i) {
470
	if(proc->exception == NULL) {return NULL;}
471
	return proc->exception->getErrorCode(i);
462
const char * XPathProcessor::getErrorCode() {
463
	if(exception == NULL) {return NULL;}
464
	return exception->getErrorCode();
472 465
}
473 466

  
474
const char * XPathProcessor::getErrorMessage(int i ){
475
	if(proc->exception == NULL) {return NULL;}
476
	return proc->exception->getErrorMessage(i);
467
const char * XPathProcessor::getErrorMessage(){
468
	if(exception == NULL) {return NULL;}
469
	return exception->getErrorMessage();
477 470
}
478 471

  
479 472
    bool XPathProcessor::exceptionOccurred(){

Also available in: Unified diff