- Timestamp:
- 01/19/06 17:46:12 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt/src/org/modelica/mdt/ErrorManager.java
r248 r260 69 69 private static final int INTERNAL_ERROR = 0; 70 70 private static final int INTERNAL_WARNING = 1; 71 /* used to logg suspected bugs */ 72 private static final int ILLEGAL_INTERNAL_STATE = 2; 71 73 72 74 /** … … 128 130 public static void showCompilerError(CompilerException exception) 129 131 { 130 boolean showErrorDialog = true;132 boolean showErrorDialog = false; 131 133 132 134 /* construct the error message */ … … 145 147 */ 146 148 } 147 148 149 149 150 String upgrade_your_software = /* the standard remedy */ … … 261 262 else 262 263 { 263 //TODO bug location 264 /* unexpected exception type */ 265 ErrorManager.logBug(MdtPlugin.getSymbolicName(), 266 "exception of unexpected type " + 267 exception.getClass().getName() + 268 " encountered"); 264 269 } 265 270 … … 308 313 } 309 314 315 /** 316 * Log illegal internal state that is a suspected bug. 317 * 318 * @param pluginSymbolicName the symbolic name of the plugin where the state 319 * is occuring 320 * @param message a descriptive message of the nature of illegalness of the 321 * state, this description should be usable to fix the bug. 322 * 323 */ 324 public static void logBug(String pluginSymbolicName, String message) 325 { 326 /* 327 * get the stack trace of the caller, 328 * used to log the location of the bug 329 */ 330 StackTraceElement ste = Thread.currentThread().getStackTrace()[3]; 331 332 IStatus status = 333 new Status(IStatus.WARNING, pluginSymbolicName, 334 ILLEGAL_INTERNAL_STATE, 335 "illegal internal status (suspected bug) encountered at " + 336 ste.getClassName() + "." + ste.getMethodName() + 337 "(" + ste.getFileName() + ":" + ste.getLineNumber() + "). " + 338 "'" + message + "'", null); 339 340 MdtPlugin.getDefault().getLog().log(status); 341 342 } 310 343 311 344 /**
Note: See TracChangeset
for help on using the changeset viewer.