Project

General

Profile

Revision d367e2a1

IDd367e2a17c86eeed88cd7e7cc9c2b2b649be94ae
Parent 86a6f5ba
Child 6c43f741

Added by Andreas Müller about 7 years ago

change on logging, try find error for stracktrace handling

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ImportHandlerBase.java
332 332
		int lineNumber = stackTrace[stackDepth].getLineNumber();
333 333
		String methodName = stackTrace[stackDepth].getMethodName();
334 334
		String location = locator == null ? " - no locator - " : "l." + locator.getLineNumber() + "/c."+ locator.getColumnNumber();
335
		IoProblemEvent event = IoProblemEvent.NewInstance(this.getClass(), message, 
335
		String className = stackTrace[stackDepth].getClassName();
336
		Class<?> declaringClass;
337
		try {
338
			declaringClass = Class.forName(className);
339
		} catch (ClassNotFoundException e) {
340
			declaringClass = this.getClass();
341
		}
342
		
343
		IoProblemEvent event = IoProblemEvent.NewInstance(declaringClass, message, 
336 344
				location, lineNumber, severity, methodName);
337 345
		return event;
338 346
	}
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/ObservableBase.java
94 94
		StackTraceElement[] stackTrace = new Exception().getStackTrace();
95 95
		int lineNumber = stackTrace[stackDepth].getLineNumber();
96 96
		String methodName = stackTrace[stackDepth].getMethodName();
97

  
98
		IoProblemEvent event = IoProblemEvent.NewInstance(this.getClass(), message, dataLocation, 
97
		String className = stackTrace[stackDepth].getClassName();
98
		Class<?> declaringClass;
99
		try {
100
			declaringClass = Class.forName(className);
101
		} catch (ClassNotFoundException e) {
102
			declaringClass = this.getClass();
103
		}
104
		
105
		IoProblemEvent event = IoProblemEvent.NewInstance(declaringClass, message, dataLocation, 
99 106
				lineNumber, severity, methodName);
100 107
		
101 108
		//for performance improvement one may read:

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)