Changeset 12924 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-10-04T19:04:14+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r12910 r12924 1420 1420 private static PluginProxy getPluginCausingException(Throwable ex) { 1421 1421 PluginProxy err = null; 1422 StackTraceElement[] stack = ex.getStackTrace(); 1422 List<StackTraceElement> stack = new ArrayList<>(); 1423 Throwable current = ex; 1424 while (current != null) { 1425 stack.addAll(Arrays.asList(current.getStackTrace())); 1426 current = current.getCause(); 1427 } 1428 1423 1429 // remember the error position, as multiple plugins may be involved, we search the topmost one 1424 int pos = stack. length;1430 int pos = stack.size(); 1425 1431 for (PluginProxy p : pluginList) { 1426 1432 String baseClass = p.getPluginInformation().className; 1427 1433 baseClass = baseClass.substring(0, baseClass.lastIndexOf('.')); 1428 1434 for (int elpos = 0; elpos < pos; ++elpos) { 1429 if (stack [elpos].getClassName().startsWith(baseClass)) {1435 if (stack.get(elpos).getClassName().startsWith(baseClass)) { 1430 1436 pos = elpos; 1431 1437 err = p;
Note:
See TracChangeset
for help on using the changeset viewer.