Changeset 2721 in josm
- Timestamp:
- 2009-12-31T15:55:21+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r2711 r2721 64 64 if (answer == 1) { 65 65 try { 66 final int maxlen = 7000; 66 67 StringWriter stack = new StringWriter(); 67 68 e.printStackTrace(new PrintWriter(stack)); … … 69 70 String text = ShowStatusReportAction.getReportHeader() 70 71 + stack.getBuffer().toString(); 72 String urltext = text.replaceAll("\r",""); /* strip useless return chars */ 73 if(urltext.length() > maxlen) 74 { 75 urltext = urltext.substring(0,maxlen); 76 int idx = urltext.lastIndexOf("\n"); 77 /* cut whole line when not loosing too much */ 78 if(maxlen-idx < 200) 79 urltext = urltext.substring(0,idx+1); 80 urltext += "...<snip>...\n"; 81 } 71 82 72 83 URL url = new URL("http://josm.openstreetmap.de/josmticket?" + … … 86 97 + "Please provide any additional information below. Attach a screenshot if\n" 87 98 + "possible.\n\n" 88 + "{{{\n" + text + "\n}}}\n",99 + "{{{\n" + urltext + "\n}}}\n", 89 100 "UTF-8"))); 90 101
Note:
See TracChangeset
for help on using the changeset viewer.