Changeset 32
- Timestamp:
- 05/08/11 18:07:33 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/t3d/src/org/etsi/t3d/T3D.java
r7 r32 192 192 .get(i)); 193 193 if (analyzer.getExceptions().size() > 0) { 194 String exceptionMessage = "Error while parsing file " 195 + analyzer.getFilename(); 196 for (int i1 = 0; i1 < analyzer.getExceptions().size(); i1++) { 197 String className = analyzer.getExceptions().get(i1).getStackTrace()[0].getClassName(); 198 String methodName = analyzer.getExceptions().get(i1).getStackTrace()[0].getMethodName(); 199 exceptionMessage+="\n "+className.substring(className.lastIndexOf(".")+1)+" : "+methodName; 200 } 194 201 195 202 // TODO: in eclipse the error stream seems to be delayed … … 198 205 // -> The terminal seems to handle this properly in contrast 199 206 if (T3D.activeProfile.isSettingAbortOnError()) { 200 throw new TTCN3ParserException( 201 "Error while parsing file " 202 + analyzer.getFilename()); 207 throw new TTCN3ParserException(exceptionMessage); 203 208 } else { 204 209 try { 205 throw new TTCN3ParserException( 206 "Error while parsing file " 207 + analyzer.getFilename()); 210 throw new TTCN3ParserException(exceptionMessage); 208 211 } catch (TTCN3ParserException e) { 209 212 System.err.println(e.getLocalizedMessage()); … … 708 711 .getInstance(); 709 712 analyzerFactory.setStandaloneUsage(true); 713 System.out.print(" Parsing file: " + filename); 714 710 715 String code = MiscTools.readFile(filename); 711 712 716 int loc = MiscTools.getLOC(filename); 713 717 linesOfCodeMap.put(filename, loc); 714 718 totalLoc += loc; 715 719 716 System.out.println(" Parsing file: " + filename + " (LOC: " 717 + linesOfCodeMap.get(filename) + ") ..."); 720 System.out.println(" (LOC: " + linesOfCodeMap.get(filename) + ") ..."); 718 721 long startTime = System.currentTimeMillis(); 719 722 … … 752 755 753 756 public static void main(String[] args) { 754 T3D tool = new T3D(); 755 tool.run(args); 757 try{ 758 T3D tool = new T3D(); 759 tool.run(args); 760 } catch (Exception e) { 761 if (getLogLevel()==LogLevel.DEBUG){ 762 e.printStackTrace(); 763 764 } else { 765 String stacktrace = ""; 766 for (StackTraceElement ste : e.getStackTrace()){ 767 stacktrace+="\n "+ste.toString(); 768 } 769 System.err.println("ERROR: A problem occurred while running T3Q" + 770 "\n Problem type: " + 771 e + 772 "\n Stacktrace:" + 773 stacktrace + 774 "\n Run T3Q with --verbosity=DEBUG for a more detailed report" ); 775 } 776 } 756 777 } 757 778 //TODO: DUPLICATE
Note: See TracChangeset
for help on using the changeset viewer.