Changeset 30 for trunk/t3q/src
- Timestamp:
- 05/08/11 18:06:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/t3q/src/org/etsi/t3q/T3Q.java
r7 r30 167 167 if (analyzer.getExceptions().size() > 0) { 168 168 String exceptionMessage = "Error while parsing file " 169 + analyzer.getFilename(); 169 + analyzer.getFilename(); 170 for (int i1 = 0; i1 < analyzer.getExceptions().size(); i1++) { 171 String className = analyzer.getExceptions().get(i1).getStackTrace()[0].getClassName(); 172 String methodName = analyzer.getExceptions().get(i1).getStackTrace()[0].getMethodName(); 173 exceptionMessage+="\n "+className.substring(className.lastIndexOf(".")+1)+" : "+methodName; 174 } 170 175 //TODO: adapt to T3D as well 171 176 String tree = ""; … … 392 397 inputPaths.add(arg); 393 398 } 394 395 399 return true; 396 400 } … … 587 591 .getInstance(); 588 592 analyzerFactory.setStandaloneUsage(true); 593 System.out.print(" Parsing file: " + filename); 594 589 595 String code = MiscTools.readFile(filename); 590 591 596 int loc = MiscTools.getLOC(filename); 592 597 linesOfCodeMap.put(filename, loc); 593 598 totalLoc += loc; 594 599 595 System.out.println(" Parsing file: " + filename + " (LOC: " 596 + linesOfCodeMap.get(filename) + ") ..."); 600 System.out.println(" (LOC: " + linesOfCodeMap.get(filename) + ") ..."); 597 601 long startTime = System.currentTimeMillis(); 598 602 … … 631 635 632 636 public static void main(String[] args) { 633 T3Q tool = new T3Q(); 634 tool.run(args); 637 try{ 638 T3Q tool = new T3Q(); 639 tool.run(args); 640 } catch (Exception e) { 641 if (getLogLevel()==LogLevel.DEBUG){ 642 e.printStackTrace(); 643 644 } else { 645 String stacktrace = ""; 646 for (StackTraceElement ste : e.getStackTrace()){ 647 stacktrace+="\n "+ste.toString(); 648 } 649 System.err.println("ERROR: A problem occurred while running T3Q" + 650 "\n Problem type: " + 651 e + 652 "\n Stacktrace:" + 653 stacktrace + 654 "\n Run T3Q with --verbosity=DEBUG for a more detailed report" ); 655 } 656 } 635 657 } 636 658 //TODO: DUPLICATED IN T3D
Note: See TracChangeset
for help on using the changeset viewer.