- Timestamp:
- 02/21/12 11:27:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/t3d/src/org/etsi/t3d/T3D.java
r53 r54 194 194 String exceptionMessage = "Error while parsing file " 195 195 + analyzer.getFilename(); 196 196 197 for (int i1 = 0; i1 < analyzer.getExceptions().size(); i1++) { 197 198 String className = analyzer.getExceptions().get(i1).getStackTrace()[0].getClassName(); 198 199 String methodName = analyzer.getExceptions().get(i1).getStackTrace()[0].getMethodName(); 199 exceptionMessage+="\n "+className.substring(className.lastIndexOf(".")+1)+" : "+methodName; 200 //moved from below, migrate to t3d as well 201 String lineMessage = "Line " 202 + analyzer.getExceptions().get(i1).getLine() 203 + ": " 204 + analyzer.getExceptions().get(i1).getMessage(); 205 exceptionMessage+="\n "+className.substring(className.lastIndexOf(".")+1)+" : "+methodName +"\n "+lineMessage; 200 206 } 201 207 … … 211 217 } catch (TTCN3ParserException e) { 212 218 System.err.println(e.getLocalizedMessage()); 213 for (int i1 = 0; i1 < analyzer.getExceptions()214 .size(); i1++) {215 System.err.println("Line "216 + analyzer.getExceptions().get(i1)217 .getLine()218 + ": "219 + analyzer.getExceptions().get(i1)220 .getMessage());221 }222 219 // e.printStackTrace(); 223 220 } … … 314 311 // parsing error 315 312 System.err.println(e.getLocalizedMessage()); 316 for (int i = 0; i < analyzer.getExceptions().size(); i++) {317 System.err.println("Line "318 + analyzer.getExceptions().get(i).getLine() + ": "319 + analyzer.getExceptions().get(i).getMessage());320 }321 313 // TODO: Isolate different steps and implement a recovery mechanism: 322 314 323 315 } 316 //TODO: move to common, use in T3D as well 317 if (getLogLevel().equals(LogLevel.DEBUG)) { 318 int mb = 1024*1024; 319 Runtime.getRuntime().maxMemory(); 320 Runtime runtime = Runtime.getRuntime(); 321 System.out.println(); 322 System.out.println("============Memory statistics:==========="); 323 // Print used memory 324 System.out.println("Used Memory:\t" 325 + (runtime.totalMemory() - runtime.freeMemory()) / mb+" MB"); 326 // Print free memory 327 System.out.println("Free Memory:\t" + runtime.freeMemory() / mb+" MB"); 328 // Print total available memory 329 System.out.println("Total Memory:\t" + runtime.totalMemory() / mb+" MB"); 330 // Print maximum available memory 331 System.out.println("Max Memory:\t" + runtime.maxMemory() / mb+" MB"); 332 } 333 324 334 } 325 335
Note: See TracChangeset
for help on using the changeset viewer.