Project

General

Profile

« Previous | Next » 

Revision 57487

Trying to improve transformator logging and error handling

View differences:

TransformationImpl.java
97 97
			@Override
98 98
			public void warning(TransformerException exception) throws TransformerException {
99 99
				// TODO Auto-generated method stub
100
				log.warn(exception);
100 101
				
101 102
			}
102 103
			
......
104 105
			public void fatalError(TransformerException exception) throws TransformerException {
105 106
				// TODO Auto-generated method stub
106 107
				errorList.add(exception);
108
				log.fatal(exception);
107 109
				throw exception;
108 110
			}
109 111
			
110 112
			@Override
111 113
			public void error(TransformerException exception) throws TransformerException {
112 114
				// TODO Auto-generated method stub
113
				
115
				errorList.add(exception);
116
				log.error(exception);
117
				throw exception;
114 118
			}
115 119
		};
116 120

  
......
136 140
		}catch(TransformerConfigurationException e){
137 141
			if (!errorList.isEmpty()) {
138 142
                System.out.println(errorList.get(0).getMessageAndLocation()); // todo it seems the location information is not yet correct
143
				log.error(errorList.get(0).getMessageAndLocation());
139 144
                throw new TransformerConfigurationException(errorList.get(0).getMessageAndLocation());
140 145
			}else{
141 146
				throw e;

Also available in: Unified diff