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/XQueryProcessor.cpp
23 23
	SaxonProcessor::sxn_environ->env->CallStaticVoidMethod(cppClass, debugMID, (jboolean)true);
24 24
#endif
25 25

  
26
    proc->exception = NULL;
26
    exception = NULL;
27 27
   // outputfile1 = "";
28 28
	if(!(proc->cwd.empty()) && curr.empty()){
29 29
		cwdXQ = proc->cwd;
......
286 286
	  SaxonProcessor::sxn_environ->env->DeleteLocalRef(objectArray);
287 287
	  SaxonProcessor::sxn_environ->env->DeleteLocalRef(stringArray);
288 288

  
289
	proc->checkAndCreateException(cppClass);
289
	exception = proc->checkAndCreateException(cppClass);
290 290
	 
291 291
  }
292 292

  
......
377 377
			return value;
378 378
     } else {
379 379
	   
380
	proc->checkAndCreateException(cppClass);		
380
	    exception = proc->checkAndCreateException(cppClass);
381 381
     	} 
382 382
  }
383 383
  return NULL;
......
433 433
            //return "result should be ok";            
434 434
	    return str;
435 435
	   } else {
436
		proc->checkAndCreateException(cppClass);
436
		    exception = proc->checkAndCreateException(cppClass);
437 437
	   		
438 438
     		}
439 439
  }
......
470 470

  
471 471

  
472 472
void XQueryProcessor::exceptionClear(){
473
	if(proc->exception != NULL) {
474
		delete proc->exception;
475
		proc->exception = NULL;	
473
	if(exception != NULL) {
474
		delete exception;
475
		exception = NULL;
476 476
		SaxonProcessor::sxn_environ->env->ExceptionClear();
477 477
	}
478 478

  
......
486 486
}
487 487

  
488 488

  
489
const char * XQueryProcessor::getErrorCode(int i) {
490
	if(proc->exception == NULL) {return NULL;}
491
	return proc->exception->getErrorCode(i);
489
const char * XQueryProcessor::getErrorCode() {
490
	if(exception == NULL) {return NULL;}
491
	return exception->getErrorCode();
492 492
}
493 493

  
494
const char * XQueryProcessor::getErrorMessage(int i ){
495
	if(proc->exception == NULL) {return NULL;}
496
	return proc->exception->getErrorMessage(i);
494
const char * XQueryProcessor::getErrorMessage(){
495
	if(exception == NULL) {return NULL;}
496
	return exception->getErrorMessage();
497 497
}
498 498

  
499 499
const char* XQueryProcessor::checkException(){
......
506 506

  
507 507

  
508 508

  
509
int XQueryProcessor::exceptionCount(){
509
/*int XQueryProcessor::exceptionCount(){
510 510
	if(proc->exception != NULL){
511 511
		return proc->exception->count();
512 512
	}
513 513
	return 0;
514
}
514
}   */

Also available in: Unified diff