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/SchemaValidator.cpp
35 35
	} else {
36 36
		cwdV = curr;
37 37
	}
38
	proc->checkAndCreateException(cppClass);
38
	exception = proc->checkAndCreateException(cppClass);
39 39

  
40 40
}
41 41

  
......
64 64
			node->setProcessor(proc);
65 65
			return node;
66 66
		}
67
		proc->checkAndCreateException(cppClass);
67
		exception = proc->checkAndCreateException(cppClass);
68 68
	}
69 69
	return NULL;
70 70
}
......
139 139
	}
140 140

  
141 141
}
142
	proc->checkAndCreateException(cppClass);				
142
	exception = proc->checkAndCreateException(cppClass);
143 143
     		
144 144
	
145 145
 }
......
166 166

  
167 167

  
168 168
      }
169
      	proc->checkAndCreateException(cppClass);
169
      exception = proc->checkAndCreateException(cppClass);
170 170

  
171 171
 }
172 172

  
......
243 243
		SaxonProcessor::sxn_environ->env->DeleteLocalRef(objectArray);
244 244
	}
245 245

  
246
}
247
	proc->checkAndCreateException(cppClass);				
246
    }
247
	exception = proc->checkAndCreateException(cppClass);
248 248
    
249 249
}
250 250

  
......
329 329
		SaxonProcessor::sxn_environ->env->DeleteLocalRef(stringArray);
330 330
		SaxonProcessor::sxn_environ->env->DeleteLocalRef(objectArray);
331 331
	}
332
	proc->checkAndCreateException(cppClass);
332
	exception = proc->checkAndCreateException(cppClass);
333 333
				
334 334
	}	
335 335
}
......
408 408
		return node;
409 409
	}
410 410

  
411
	proc->checkAndCreateException(cppClass);
411
	exception = proc->checkAndCreateException(cppClass);
412 412

  
413 413
}
414 414
	return NULL;
415 415
}
416 416

  
417 417
void SchemaValidator::exceptionClear(){
418
 if(proc->exception != NULL) {
419
 	delete proc->exception;
420
 	proc->exception = NULL;
418
 if(exception != NULL) {
419
 	delete exception;
420
 	exception = NULL;
421 421
 }
422 422
   SaxonProcessor::sxn_environ->env->ExceptionClear();
423 423
 }
424 424

  
425
const char * SchemaValidator::getErrorCode(int i) {
425
/*const char * SchemaValidator::getErrorCode(int i) {
426 426
	if(proc->exception == NULL) {return NULL;}
427 427
	return proc->exception->getErrorCode(i);
428 428
}
......
430 430
const char * SchemaValidator::getErrorMessage(int i ){
431 431
 if(proc->exception == NULL) {return NULL;}
432 432
 return proc->exception->getErrorMessage(i);
433
 }
433
 } */
434 434

  
435 435
bool SchemaValidator::exceptionOccurred() {
436
	return proc->exceptionOccurred() || proc->exception != NULL;
436
	return proc->exceptionOccurred() || exception != NULL;
437 437
}
438 438

  
439 439
const char* SchemaValidator::checkException() {
440 440
	return proc->checkException(cppV);
441 441
}
442 442

  
443
int SchemaValidator::exceptionCount(){
443
/*int SchemaValidator::exceptionCount(){
444 444
 if(proc->exception != NULL){
445 445
 return proc->exception->count();
446 446
 }
447 447
 return 0;
448
 }
448
 }   */
449 449

  
450 450
void SchemaValidator::setSourceNode(XdmNode * value) {
451 451
    if(value != NULL){

Also available in: Unified diff