Lines 1280-1286
Link Here
|
1280 |
"FMT_ErrorSettingProperty", userMessage, |
1280 |
"FMT_ErrorSettingProperty", userMessage, |
1281 |
propertyName |
1281 |
propertyName |
1282 |
)); |
1282 |
)); |
1283 |
em.notify (ErrorManager.USER, e); |
1283 |
em.notify (extractSeverity (e), e); |
1284 |
} else { |
1284 |
} else { |
1285 |
em.notify (ErrorManager.INFORMATIONAL, e); |
1285 |
em.notify (ErrorManager.INFORMATIONAL, e); |
1286 |
} |
1286 |
} |
Lines 1309-1314
Link Here
|
1309 |
} |
1309 |
} |
1310 |
return message; |
1310 |
return message; |
1311 |
} |
1311 |
} |
|
|
1312 |
|
1313 |
private static int extractSeverity (Throwable t) { |
1314 |
ErrorManager em = ErrorManager.getDefault (); |
1315 |
|
1316 |
ErrorManager.Annotation[] an = em.findAnnotations (t); |
1317 |
int userSeverity = ErrorManager.UNKNOWN; |
1318 |
if (an != null) { |
1319 |
for (int i = 0; i < an.length; i++) { |
1320 |
int severity = an[i].getSeverity (); |
1321 |
// PENDING |
1322 |
// select highest severity of the annotations |
1323 |
// or select lowlest? |
1324 |
// or use severity of annotation on the top? |
1325 |
if (severity > userSeverity) { |
1326 |
userSeverity = severity; |
1327 |
} |
1328 |
} |
1329 |
} |
1330 |
return userSeverity; |
1331 |
} |
1312 |
|
1332 |
|
1313 |
/** Processes <code>Throwable</code> thrown from <code>setAsText</code> |
1333 |
/** Processes <code>Throwable</code> thrown from <code>setAsText</code> |
1314 |
* or <code>setValue</code> call on <code>editor</code>. Helper method. */ |
1334 |
* or <code>setValue</code> call on <code>editor</code>. Helper method. */ |
Lines 1480-1486
Link Here
|
1480 |
if(exception instanceof InvocationTargetException) { |
1500 |
if(exception instanceof InvocationTargetException) { |
1481 |
return (InvocationTargetException)exception; |
1501 |
return (InvocationTargetException)exception; |
1482 |
} else { |
1502 |
} else { |
1483 |
return new InvocationTargetException(exception); |
1503 |
InvocationTargetException ite = new InvocationTargetException(exception); |
|
|
1504 |
ErrorManager.Annotation[] arr = ErrorManager.getDefault ().findAnnotations (exception); |
1505 |
return (InvocationTargetException)ErrorManager.getDefault ().attachAnnotations (ite, arr); |
1484 |
} |
1506 |
} |
1485 |
} |
1507 |
} |
1486 |
|
1508 |
|