diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-04-02 13:47:50 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-04-02 13:47:50 +0200 |
| commit | d55167bd7a1fd028dda0fdd60180c3f23cb741ec (patch) | |
| tree | f72cf118b48f7339da81f2c06c90f1f4fd2652d5 | |
| parent | 8e29b51521aa23a73a0f9d7db26606cd746139d4 (diff) | |
| parent | e122fbf8a43ec5575615fce457dd99073ff9553d (diff) | |
| download | cgeo-d55167bd7a1fd028dda0fdd60180c3f23cb741ec.zip cgeo-d55167bd7a1fd028dda0fdd60180c3f23cb741ec.tar.gz cgeo-d55167bd7a1fd028dda0fdd60180c3f23cb741ec.tar.bz2 | |
Merge branch 'release' into upstream
| -rw-r--r-- | main/src/cgeo/geocaching/export/GpxSerializer.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java index 962f0d3..fef91cf 100644 --- a/main/src/cgeo/geocaching/export/GpxSerializer.java +++ b/main/src/cgeo/geocaching/export/GpxSerializer.java @@ -8,6 +8,7 @@ import cgeo.geocaching.Waypoint; import cgeo.geocaching.enumerations.CacheAttribute; import cgeo.geocaching.enumerations.LoadFlags; import cgeo.geocaching.geopoint.Geopoint; +import cgeo.geocaching.utils.Log; import cgeo.geocaching.utils.SynchronizedDateFormat; import cgeo.geocaching.utils.TextUtils; import cgeo.geocaching.utils.XmlUtils; @@ -258,7 +259,12 @@ public final class GpxSerializer { gpx.startTag(PREFIX_GROUNDSPEAK, "text"); gpx.attribute("", "encoded", "False"); - gpx.text(log.log); + try { + gpx.text(log.log); + } catch (final IllegalArgumentException e) { + Log.e("GpxSerializer.writeLogs: cannot write log " + log.id + " for cache " + cache.getGeocode(), e); + gpx.text(" [end of log omitted due to an invalid character]"); + } gpx.endTag(PREFIX_GROUNDSPEAK, "text"); gpx.endTag(PREFIX_GROUNDSPEAK, "log"); |
