Revision 1688 tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/tmx/compiler.groovy

compiler.groovy (revision 1688)
341 341
				}
342 342
			}
343 343
			output.close();
344
			parser.close();
344
			if (parser != null) parser.close();
345
		if (inputData != null) inputData.close();
345 346
		}
346
		catch (XMLStreamException ex) {
347
			System.out.println(ex);
347
		catch (Exception ex) {
348
			System.out.println("Exception while parsing " + inputData);
349
			if (parser != null) parser.close();
350
			if (inputData != null) inputData.close();
351
			return false;
348 352
		}
349
		catch (IOException ex) {
350
			System.out.println("IOException while parsing " + inputData);
351
		}
352 353

  
353 354
		return true;
354 355
	}
......
392 393
						}
393 394
				}
394 395
			}
396
			if (parser != null) parser.close();
397
			if (inputData != null) inputData.close();
395 398
		}
396 399
		return new ArrayList<String>(tuprops);
397 400
	}

Also available in: Unified diff