diff --git a/vtm-android-example/src/org/oscim/android/filepicker/ValidRenderTheme.java b/vtm-android-example/src/org/oscim/android/filepicker/ValidRenderTheme.java index 8cce66099..a53f832dd 100644 --- a/vtm-android-example/src/org/oscim/android/filepicker/ValidRenderTheme.java +++ b/vtm-android-example/src/org/oscim/android/filepicker/ValidRenderTheme.java @@ -33,7 +33,7 @@ public boolean accept(File file) { ThemeLoader.load(file.getAbsolutePath()); mOpenResult = OpenResult.SUCCESS; } catch (Exception e) { - mOpenResult = new OpenResult(e.getMessage()); + mOpenResult = new OpenResult(e.toString()); } return mOpenResult.isSuccess(); } diff --git a/vtm-android-example/src/org/oscim/android/test/MBTilesMvtActivity.java b/vtm-android-example/src/org/oscim/android/test/MBTilesMvtActivity.java index 21cc71959..4cb443ea6 100644 --- a/vtm-android-example/src/org/oscim/android/test/MBTilesMvtActivity.java +++ b/vtm-android-example/src/org/oscim/android/test/MBTilesMvtActivity.java @@ -62,7 +62,7 @@ public void onClick(DialogInterface dialog, int which) { } catch (MBTilesUnsupportedException e) { AlertDialog.Builder builder = new AlertDialog.Builder(this) .setTitle(R.string.warning) - .setMessage(e.getMessage()) + .setMessage(e.toString()) .setPositiveButton(R.string.exit, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { diff --git a/vtm-android-example/src/org/oscim/android/test/MapsforgeActivity.java b/vtm-android-example/src/org/oscim/android/test/MapsforgeActivity.java index acbf7987d..e8c83f7d4 100644 --- a/vtm-android-example/src/org/oscim/android/test/MapsforgeActivity.java +++ b/vtm-android-example/src/org/oscim/android/test/MapsforgeActivity.java @@ -227,7 +227,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { mPrefs.clear(); } } catch (Exception e) { - log.error(e.getMessage()); + log.error(e.toString()); finish(); } } else if (requestCode == SELECT_THEME_ARCHIVE) { diff --git a/vtm-android-example/src/org/oscim/android/test/PoiSearchActivity.java b/vtm-android-example/src/org/oscim/android/test/PoiSearchActivity.java index 178f963b5..65943391f 100644 --- a/vtm-android-example/src/org/oscim/android/test/PoiSearchActivity.java +++ b/vtm-android-example/src/org/oscim/android/test/PoiSearchActivity.java @@ -299,7 +299,7 @@ protected Collection doInBackground(BoundingBox... params) { params[0].getMaxLatitude(), params[0].getMaxLongitude()); return mPersistenceManager.findInRect(bb, categoryFilter, patterns, null, Integer.MAX_VALUE, true); } catch (Throwable t) { - log.error(t.getMessage(), t); + log.error(t.toString(), t); } return null; } diff --git a/vtm-android-mvt/src/org/oscim/android/mvt/tiling/source/mbtiles/MBTilesMvtTileDataSource.java b/vtm-android-mvt/src/org/oscim/android/mvt/tiling/source/mbtiles/MBTilesMvtTileDataSource.java index 418b3e391..420510b58 100644 --- a/vtm-android-mvt/src/org/oscim/android/mvt/tiling/source/mbtiles/MBTilesMvtTileDataSource.java +++ b/vtm-android-mvt/src/org/oscim/android/mvt/tiling/source/mbtiles/MBTilesMvtTileDataSource.java @@ -135,7 +135,7 @@ public void query(MapTile requestTile, ITileDataSink requestDataSink) { } else responseDataSink.completed(QueryResult.TILE_NOT_FOUND); } catch (Throwable t) { - log.error(t.getMessage(), t); + log.error(t.toString(), t); responseDataSink.completed(QueryResult.FAILED); } finally { if (cursor != null) diff --git a/vtm-android/src/org/oscim/android/theme/AssetsRenderTheme.java b/vtm-android/src/org/oscim/android/theme/AssetsRenderTheme.java index 41b718b6a..7dddd3cd8 100644 --- a/vtm-android/src/org/oscim/android/theme/AssetsRenderTheme.java +++ b/vtm-android/src/org/oscim/android/theme/AssetsRenderTheme.java @@ -98,7 +98,7 @@ public InputStream getRenderThemeAsStream() throws ThemeException { try { return mAssetManager.open((TextUtils.isEmpty(mRelativePathPrefix) ? "" : mRelativePathPrefix) + mFileName); } catch (IOException e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } } diff --git a/vtm-android/src/org/oscim/android/theme/ContentRenderTheme.java b/vtm-android/src/org/oscim/android/theme/ContentRenderTheme.java index 1c19a1ed3..952bb9313 100644 --- a/vtm-android/src/org/oscim/android/theme/ContentRenderTheme.java +++ b/vtm-android/src/org/oscim/android/theme/ContentRenderTheme.java @@ -88,7 +88,7 @@ public InputStream getRenderThemeAsStream() throws ThemeException { try { return mContentResolver.openInputStream(mUri); } catch (IOException e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } } diff --git a/vtm-android/src/org/oscim/android/tiling/source/mbtiles/MBTilesBitmapTileDataSource.java b/vtm-android/src/org/oscim/android/tiling/source/mbtiles/MBTilesBitmapTileDataSource.java index ad086d7d2..86905682b 100644 --- a/vtm-android/src/org/oscim/android/tiling/source/mbtiles/MBTilesBitmapTileDataSource.java +++ b/vtm-android/src/org/oscim/android/tiling/source/mbtiles/MBTilesBitmapTileDataSource.java @@ -125,7 +125,7 @@ public void query(MapTile tile, ITileDataSink sink) { sink.setTileImage(bitmap); res = QueryResult.SUCCESS; } catch (Throwable t) { - log.error(t.getMessage(), t); + log.error(t.toString(), t); } finally { sink.completed(res); } diff --git a/vtm-app/src/org/oscim/app/filefilter/ValidRenderTheme.java b/vtm-app/src/org/oscim/app/filefilter/ValidRenderTheme.java index 1ee56011b..6d562e493 100644 --- a/vtm-app/src/org/oscim/app/filefilter/ValidRenderTheme.java +++ b/vtm-app/src/org/oscim/app/filefilter/ValidRenderTheme.java @@ -32,7 +32,7 @@ public boolean accept(File file) { ThemeLoader.load(file.getAbsolutePath()); mOpenResult = OpenResult.SUCCESS; } catch (Exception e) { - mOpenResult = new OpenResult(e.getMessage()); + mOpenResult = new OpenResult(e.toString()); } return mOpenResult.isSuccess(); } diff --git a/vtm-desktop/src/org/oscim/awt/AwtBitmap.java b/vtm-desktop/src/org/oscim/awt/AwtBitmap.java index 3dc4cae1f..aefb4f2bf 100644 --- a/vtm-desktop/src/org/oscim/awt/AwtBitmap.java +++ b/vtm-desktop/src/org/oscim/awt/AwtBitmap.java @@ -167,7 +167,7 @@ public byte[] getPngEncodedData() { ImageIO.write(this.bitmap, "png", outputStream); return outputStream.toByteArray(); } catch (IOException e) { - log.error(e.getMessage(), e); + log.error(e.toString(), e); } finally { IOUtils.closeQuietly(outputStream); } diff --git a/vtm-gdx/src/org/oscim/gdx/GdxAssets.java b/vtm-gdx/src/org/oscim/gdx/GdxAssets.java index 801161402..591d8c3a3 100644 --- a/vtm-gdx/src/org/oscim/gdx/GdxAssets.java +++ b/vtm-gdx/src/org/oscim/gdx/GdxAssets.java @@ -46,7 +46,7 @@ public InputStream openFileAsStream(String fileName) { try { return file.read(); } catch (GdxRuntimeException e) { - log.debug(e.getMessage()); + log.debug(e.toString()); return null; } } diff --git a/vtm-http/src/org/oscim/tiling/source/OkHttpEngine.java b/vtm-http/src/org/oscim/tiling/source/OkHttpEngine.java index 54f29f426..be4877a21 100644 --- a/vtm-http/src/org/oscim/tiling/source/OkHttpEngine.java +++ b/vtm-http/src/org/oscim/tiling/source/OkHttpEngine.java @@ -89,7 +89,7 @@ public void sendRequest(Tile tile) throws IOException { } else mInputStream = response.body().byteStream(); } catch (Exception e) { - log.error(e.getMessage(), e); + log.error(e.toString(), e); } } @@ -101,7 +101,7 @@ public void close() { try { mInputStream.close(); } catch (Exception e) { - log.error(e.getMessage(), e); + log.error(e.toString(), e); } mInputStream = null; } @@ -112,7 +112,7 @@ public void setCache(OutputStream os) { try { os.write(mCachedData); } catch (IOException e) { - log.error(e.getMessage(), e); + log.error(e.toString(), e); } } } diff --git a/vtm-ios/src/org/oscim/ios/backend/IosSvgBitmap.java b/vtm-ios/src/org/oscim/ios/backend/IosSvgBitmap.java index cd01d0076..d5969a6cf 100644 --- a/vtm-ios/src/org/oscim/ios/backend/IosSvgBitmap.java +++ b/vtm-ios/src/org/oscim/ios/backend/IosSvgBitmap.java @@ -49,7 +49,7 @@ private static String getStringFromInputStream(InputStream is) { sb.append(line); } } catch (IOException e) { - log.error(e.getMessage(), e); + log.error(e.toString(), e); } finally { IOUtils.closeQuietly(br); } diff --git a/vtm-web/src/org/oscim/gdx/emu/com/badlogic/gdx/backends/gwt/GwtApplication.java b/vtm-web/src/org/oscim/gdx/emu/com/badlogic/gdx/backends/gwt/GwtApplication.java index fccd7e74e..e30b0c740 100644 --- a/vtm-web/src/org/oscim/gdx/emu/com/badlogic/gdx/backends/gwt/GwtApplication.java +++ b/vtm-web/src/org/oscim/gdx/emu/com/badlogic/gdx/backends/gwt/GwtApplication.java @@ -196,7 +196,7 @@ void setupLoop() { listener.create(); listener.resize(graphics.getWidth(), graphics.getHeight()); } catch (Throwable t) { - error("GwtApplication", "exception: " + t.getMessage(), t); + error("GwtApplication", "exception: " + t.toString(), t); t.printStackTrace(); throw new RuntimeException(t); } @@ -207,7 +207,7 @@ public void execute(double timestamp) { try { mainLoop(); } catch (Throwable t) { - error("GwtApplication", "exception: " + t.getMessage(), t); + error("GwtApplication", "exception: " + t.toString(), t); throw new RuntimeException(t); } AnimationScheduler.get().requestAnimationFrame(this, graphics.canvas); @@ -343,7 +343,7 @@ public void log(String tag, String message, Throwable exception) { checkLogLabel(); log.setText(log.getText() + "\n" + tag + ": " + message + "\n" + getMessages(exception) + "\n"); log.setCursorPos(log.getText().length() - 1); - System.out.println(tag + ": " + message + "\n" + exception.getMessage()); + System.out.println(tag + ": " + message + "\n" + exception.toString()); System.out.println(getStackTrace(exception)); } } @@ -364,7 +364,7 @@ public void error(String tag, String message, Throwable exception) { checkLogLabel(); log.setText(log.getText() + "\n" + tag + ": " + message + "\n" + getMessages(exception) + "\n"); log.setCursorPos(log.getText().length() - 1); - System.err.println(tag + ": " + message + "\n" + exception.getMessage() + "\n"); + System.err.println(tag + ": " + message + "\n" + exception.toString() + "\n"); System.out.println(getStackTrace(exception)); } } @@ -385,7 +385,7 @@ public void debug(String tag, String message, Throwable exception) { checkLogLabel(); log.setText(log.getText() + "\n" + tag + ": " + message + "\n" + getMessages(exception) + "\n"); log.setCursorPos(log.getText().length() - 1); - System.out.println(tag + ": " + message + "\n" + exception.getMessage()); + System.out.println(tag + ": " + message + "\n" + exception.toString()); System.out.println(getStackTrace(exception)); } } @@ -393,7 +393,7 @@ public void debug(String tag, String message, Throwable exception) { private String getMessages(Throwable e) { StringBuffer buffer = new StringBuffer(); while (e != null) { - buffer.append(e.getMessage() + "\n"); + buffer.append(e.toString() + "\n"); e = e.getCause(); } return buffer.toString(); diff --git a/vtm-web/src/org/oscim/gdx/emu/org/oscim/theme/XmlAtlasThemeBuilder.java b/vtm-web/src/org/oscim/gdx/emu/org/oscim/theme/XmlAtlasThemeBuilder.java index a6bacfc86..937e7dff8 100644 --- a/vtm-web/src/org/oscim/gdx/emu/org/oscim/theme/XmlAtlasThemeBuilder.java +++ b/vtm-web/src/org/oscim/gdx/emu/org/oscim/theme/XmlAtlasThemeBuilder.java @@ -58,7 +58,7 @@ public static IRenderTheme read(ThemeFile theme, ThemeCallback themeCallback) th try { new XMLReaderAdapter().parse(renderThemeHandler, theme.getRenderThemeAsStream()); } catch (Exception e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } TextureAtlasUtils.createTextureRegions(renderThemeHandler.bitmapMap, outputMap, atlasList, diff --git a/vtm-web/src/org/oscim/gdx/emu/org/oscim/theme/XmlThemeBuilder.java b/vtm-web/src/org/oscim/gdx/emu/org/oscim/theme/XmlThemeBuilder.java index 3914a11c4..ed7e2e758 100644 --- a/vtm-web/src/org/oscim/gdx/emu/org/oscim/theme/XmlThemeBuilder.java +++ b/vtm-web/src/org/oscim/gdx/emu/org/oscim/theme/XmlThemeBuilder.java @@ -115,7 +115,7 @@ public static IRenderTheme read(ThemeFile theme, ThemeCallback themeCallback) th try { new XMLReaderAdapter().parse(renderThemeHandler, theme.getRenderThemeAsStream()); } catch (Exception e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } return renderThemeHandler.mRenderTheme; @@ -236,12 +236,12 @@ public void endElement(String uri, String localName, String qName) { @Override public void error(SAXParseException exception) { - log.debug(exception.getMessage()); + log.debug(exception.toString()); } @Override public void warning(SAXParseException exception) { - log.debug(exception.getMessage()); + log.debug(exception.toString()); } @Override @@ -385,9 +385,9 @@ public void startElement(String uri, String localName, String qName, throw new SAXException("unknown element: " + localName); } } catch (SAXException e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } catch (IOException e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } } @@ -1103,7 +1103,7 @@ else if ("position".equals(name)) { try { b.bitmap = CanvasAdapter.getBitmapAsset(mTheme.getRelativePathPrefix(), symbol, mTheme.getResourceProvider(), b.symbolWidth, b.symbolHeight, b.symbolPercent); } catch (Exception e) { - log.error("{}: {}", symbol, e.getMessage()); + log.error("{}: {}", symbol, e.toString()); } } else b.texture = getAtlasRegion(symbol); @@ -1251,7 +1251,7 @@ private SymbolStyle buildSymbol(SymbolBuilder b) { if (bitmap != null) return buildSymbol(b, b.src, bitmap); } catch (Exception e) { - log.error("{}: {}", b.src, e.getMessage()); + log.error("{}: {}", b.src, e.toString()); } return null; } diff --git a/vtm-web/src/org/oscim/gdx/emu/org/oscim/utils/IOUtils.java b/vtm-web/src/org/oscim/gdx/emu/org/oscim/utils/IOUtils.java index b360a5aef..660233a77 100644 --- a/vtm-web/src/org/oscim/gdx/emu/org/oscim/utils/IOUtils.java +++ b/vtm-web/src/org/oscim/gdx/emu/org/oscim/utils/IOUtils.java @@ -38,7 +38,7 @@ public static void closeQuietly(OutputStream closeable) { closeable.close(); } } catch (IOException e) { - //log.debug(e.getMessage() + " " + e); + //log.debug(e.toString() + " " + e); } } @@ -48,7 +48,7 @@ public static void closeQuietly(InputStream closeable) { closeable.close(); } } catch (IOException e) { - //log.debug(e.getMessage() + " " + e); + //log.debug(e.toString() + " " + e); } } diff --git a/vtm-web/src/org/oscim/gdx/emu/org/xmlpull/v1/XmlPullParserException.java b/vtm-web/src/org/oscim/gdx/emu/org/xmlpull/v1/XmlPullParserException.java index b4b4b7135..b7b9f5f97 100644 --- a/vtm-web/src/org/oscim/gdx/emu/org/xmlpull/v1/XmlPullParserException.java +++ b/vtm-web/src/org/oscim/gdx/emu/org/xmlpull/v1/XmlPullParserException.java @@ -53,10 +53,10 @@ public XmlPullParserException(String msg, XmlPullParser parser, Throwable chain) /* public String getMessage() { if(detail == null) - return super.getMessage(); + return super.toString(); else - return super.getMessage() + "; nested exception is: \n\t" - + detail.getMessage(); + return super.toString() + "; nested exception is: \n\t" + + detail.toString(); } */ @@ -66,7 +66,7 @@ public void printStackTrace() { super.printStackTrace(); } else { synchronized(System.err) { - System.err.println(super.getMessage() + "; nested exception is:"); + System.err.println(super.toString() + "; nested exception is:"); detail.printStackTrace(); } } diff --git a/vtm-web/src/org/oscim/tiling/source/JsonTileDataSource.java b/vtm-web/src/org/oscim/tiling/source/JsonTileDataSource.java index 566c8effd..c26f3a9bb 100644 --- a/vtm-web/src/org/oscim/tiling/source/JsonTileDataSource.java +++ b/vtm-web/src/org/oscim/tiling/source/JsonTileDataSource.java @@ -92,7 +92,7 @@ void doGet(final String url) { public void onFailure(Throwable caught) { mSink.completed(FAILED); - log.debug("fail! {} {}", mRequestHandle, caught.getMessage()); + log.debug("fail! {} {}", mRequestHandle, caught.toString()); //mRequestHandle.cancel(); } diff --git a/vtm/src/org/oscim/layers/tile/bitmap/BitmapTileLoader.java b/vtm/src/org/oscim/layers/tile/bitmap/BitmapTileLoader.java index 4e426b376..78563fbab 100644 --- a/vtm/src/org/oscim/layers/tile/bitmap/BitmapTileLoader.java +++ b/vtm/src/org/oscim/layers/tile/bitmap/BitmapTileLoader.java @@ -47,7 +47,7 @@ protected boolean loadTile(MapTile tile) { try { mTileDataSource.query(tile, this); } catch (Exception e) { - log.debug("{} {}", tile, e.getMessage()); + log.debug("{} {}", tile, e.toString()); return false; } return true; diff --git a/vtm/src/org/oscim/layers/tile/vector/VectorTileLoader.java b/vtm/src/org/oscim/layers/tile/vector/VectorTileLoader.java index 0c64844d4..747cf3c4b 100644 --- a/vtm/src/org/oscim/layers/tile/vector/VectorTileLoader.java +++ b/vtm/src/org/oscim/layers/tile/vector/VectorTileLoader.java @@ -119,10 +119,10 @@ public boolean loadTile(MapTile tile) { /* query data source, which calls process() callback */ mTileDataSource.query(tile, this); } catch (NullPointerException e) { - log.debug("NPE {} {}", tile, e.getMessage()); + log.debug("NPE {} {}", tile, e.toString()); e.printStackTrace(); } catch (Throwable t) { - log.debug("{} {}", tile, t.getMessage()); + log.debug("{} {}", tile, t.toString()); t.printStackTrace(); return false; } diff --git a/vtm/src/org/oscim/map/Layers.java b/vtm/src/org/oscim/map/Layers.java index b83c9aa0d..6bdde295d 100644 --- a/vtm/src/org/oscim/map/Layers.java +++ b/vtm/src/org/oscim/map/Layers.java @@ -345,7 +345,7 @@ public synchronized void updateLayers() { mDirtyLayers = false; } catch (Exception e) { - log.error(e.getMessage(), e); + log.error(e.toString(), e); } } } diff --git a/vtm/src/org/oscim/renderer/MapRenderer.java b/vtm/src/org/oscim/renderer/MapRenderer.java index 24dbee1a3..57b613463 100644 --- a/vtm/src/org/oscim/renderer/MapRenderer.java +++ b/vtm/src/org/oscim/renderer/MapRenderer.java @@ -96,7 +96,7 @@ public void onDrawFrame() { try { draw(); } catch (Throwable t) { - log.error(t.getMessage(), t); + log.error(t.toString(), t); } mMap.doneFrame(rerender); diff --git a/vtm/src/org/oscim/theme/ExternalRenderTheme.java b/vtm/src/org/oscim/theme/ExternalRenderTheme.java index 8e3b44187..35db85fba 100644 --- a/vtm/src/org/oscim/theme/ExternalRenderTheme.java +++ b/vtm/src/org/oscim/theme/ExternalRenderTheme.java @@ -106,7 +106,7 @@ public InputStream getRenderThemeAsStream() throws ThemeException { try { is = new FileInputStream(mPath); } catch (FileNotFoundException e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } return is; } diff --git a/vtm/src/org/oscim/theme/ThemeUtils.java b/vtm/src/org/oscim/theme/ThemeUtils.java index eab1fa9f7..5dca678dd 100644 --- a/vtm/src/org/oscim/theme/ThemeUtils.java +++ b/vtm/src/org/oscim/theme/ThemeUtils.java @@ -53,7 +53,7 @@ public void startElement(String uri, String localName, String qName, Attributes } return isMapsforgeTheme.get(); } catch (Exception e) { - log.error(e.getMessage(), e); + log.error(e.toString(), e); return false; } } diff --git a/vtm/src/org/oscim/theme/XmlAtlasThemeBuilder.java b/vtm/src/org/oscim/theme/XmlAtlasThemeBuilder.java index d332eac00..824840136 100644 --- a/vtm/src/org/oscim/theme/XmlAtlasThemeBuilder.java +++ b/vtm/src/org/oscim/theme/XmlAtlasThemeBuilder.java @@ -66,7 +66,7 @@ public static IRenderTheme read(ThemeFile theme, ThemeCallback themeCallback) th true, CanvasAdapter.platform == Platform.IOS); return replaceThemeSymbols(renderThemeHandler.mRenderTheme, outputMap); } catch (Exception e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } finally { IOUtils.closeQuietly(inputStream); } diff --git a/vtm/src/org/oscim/theme/XmlThemeBuilder.java b/vtm/src/org/oscim/theme/XmlThemeBuilder.java index 59636fe7a..66f25a05e 100644 --- a/vtm/src/org/oscim/theme/XmlThemeBuilder.java +++ b/vtm/src/org/oscim/theme/XmlThemeBuilder.java @@ -118,7 +118,7 @@ public static IRenderTheme read(ThemeFile theme, ThemeCallback themeCallback) th renderThemeHandler.processRenderTheme(); return renderThemeHandler.mRenderTheme; } catch (Exception e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } finally { IOUtils.closeQuietly(inputStream); } @@ -409,7 +409,7 @@ public void startElement() throws ThemeException { throw new XmlPullParserException("unknown element: " + qName); } } catch (XmlPullParserException | IOException e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } } @@ -1124,7 +1124,7 @@ else if ("position".equals(name)) { try { b.bitmap = CanvasAdapter.getBitmapAsset(mTheme.getRelativePathPrefix(), symbol, mTheme.getResourceProvider(), b.symbolWidth, b.symbolHeight, (int) (b.symbolPercent * CanvasAdapter.symbolScale)); } catch (Exception e) { - log.error("{}: {}", symbol, e.getMessage()); + log.error("{}: {}", symbol, e.toString()); } } else b.texture = getAtlasRegion(symbol); @@ -1280,7 +1280,7 @@ private SymbolStyle buildSymbol(SymbolBuilder b) { if (bitmap != null) return buildSymbol(b, b.src, bitmap); } catch (Exception e) { - log.error("{}: {}", b.src, e.getMessage()); + log.error("{}: {}", b.src, e.toString()); } return null; } diff --git a/vtm/src/org/oscim/theme/ZipRenderTheme.java b/vtm/src/org/oscim/theme/ZipRenderTheme.java index 28cc07770..3b4ab173c 100644 --- a/vtm/src/org/oscim/theme/ZipRenderTheme.java +++ b/vtm/src/org/oscim/theme/ZipRenderTheme.java @@ -89,7 +89,7 @@ public InputStream getRenderThemeAsStream() throws ThemeException { try { return mResourceProvider.createInputStream(mRelativePathPrefix, mXmlTheme.substring(mXmlTheme.lastIndexOf("/") + 1)); } catch (IOException e) { - throw new ThemeException(e.getMessage(), e); + throw new ThemeException(e.toString(), e); } } diff --git a/vtm/src/org/oscim/tiling/OverzoomTileDataSource.java b/vtm/src/org/oscim/tiling/OverzoomTileDataSource.java index 9e3afcaaa..98c1219c0 100644 --- a/vtm/src/org/oscim/tiling/OverzoomTileDataSource.java +++ b/vtm/src/org/oscim/tiling/OverzoomTileDataSource.java @@ -46,7 +46,7 @@ public void query(MapTile tile, ITileDataSink sink) { } tileDataSource.query(mapTile, dataSink); } catch (Throwable t) { - log.error(t.getMessage(), t); + log.error(t.toString(), t); } } diff --git a/vtm/src/org/oscim/tiling/source/LwHttp.java b/vtm/src/org/oscim/tiling/source/LwHttp.java index ff68bc287..a73a79fa9 100644 --- a/vtm/src/org/oscim/tiling/source/LwHttp.java +++ b/vtm/src/org/oscim/tiling/source/LwHttp.java @@ -145,7 +145,7 @@ public boolean finishedReading() { try { while (bytesRead < contentLength && read() >= 0) ; } catch (IOException e) { - log.debug(e.getMessage()); + log.debug(e.toString()); } return bytesRead == contentLength; @@ -350,7 +350,7 @@ else if (System.nanoTime() - mLastRequest > RESPONSE_TIMEOUT) close(); } } catch (IOException e) { - log.debug(e.getMessage()); + log.debug(e.toString()); close(); } } diff --git a/vtm/src/org/oscim/tiling/source/UrlTileDataSource.java b/vtm/src/org/oscim/tiling/source/UrlTileDataSource.java index 374733123..191aad233 100644 --- a/vtm/src/org/oscim/tiling/source/UrlTileDataSource.java +++ b/vtm/src/org/oscim/tiling/source/UrlTileDataSource.java @@ -84,18 +84,18 @@ public void query(MapTile tile, ITileDataSink sink) { if (mTileDecoder.decode(tile, sink, is)) res = QueryResult.SUCCESS; } catch (SocketException e) { - log.debug("{} Socket Error: {}", tile, e.getMessage()); + log.debug("{} Socket Error: {}", tile, e.toString()); } catch (SocketTimeoutException e) { log.debug("{} Socket Timeout", tile); res = QueryResult.DELAYED; } catch (UnknownHostException e) { - log.debug("{} Unknown host: {}", tile, e.getMessage()); + log.debug("{} Unknown host: {}", tile, e.toString()); } catch (IOException e) { - log.debug("{} Network Error: {}", tile, e.getMessage()); + log.debug("{} Network Error: {}", tile, e.toString()); } catch (Exception e) { - log.debug("{} Error: {}", tile, e.getMessage()); + log.debug("{} Error: {}", tile, e.toString()); } catch (Throwable t) { - log.error(t.getMessage(), t); + log.error(t.toString(), t); } finally { boolean ok = (res == QueryResult.SUCCESS); diff --git a/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java b/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java index 4594e04c5..1ead5b1d5 100644 --- a/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java +++ b/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java @@ -236,7 +236,7 @@ public MapDatabase(MapFileTileSource tileSource) throws IOException { } mFileSize = mInputChannel.size(); } catch (IOException e) { - log.error(e.getMessage()); + log.error(e.toString()); /* make sure that the file is closed */ dispose(); throw new IOException(); @@ -310,7 +310,7 @@ public void query(MapTile tile, ITileDataSink sink) { processBlocks(sink, queryParameters, subFileParameter); sink.completed(QueryResult.SUCCESS); } catch (Throwable t) { - log.error(t.getMessage(), t); + log.error(t.toString(), t); sink.completed(QueryResult.FAILED); } } @@ -322,7 +322,7 @@ public void dispose() { mInputChannel.close(); mInputChannel = null; } catch (IOException e) { - log.error(e.getMessage()); + log.error(e.toString()); } } } @@ -1161,7 +1161,7 @@ private MapReadResult readMapData(Tile upperLeft, Tile lowerRight, Selector sele QueryCalculations.calculateBlocks(queryParameters, subFileParameter); processBlocks(queryParameters, subFileParameter, Tile.getBoundingBox(upperLeft, lowerRight), selector, mapReadResult); } catch (IOException e) { - log.error(e.getMessage()); + log.error(e.toString()); return null; } diff --git a/vtm/src/org/oscim/tiling/source/mapfile/MapFileTileSource.java b/vtm/src/org/oscim/tiling/source/mapfile/MapFileTileSource.java index 35ad5a15b..db6cc7c5e 100644 --- a/vtm/src/org/oscim/tiling/source/mapfile/MapFileTileSource.java +++ b/vtm/src/org/oscim/tiling/source/mapfile/MapFileTileSource.java @@ -153,10 +153,10 @@ public OpenResult open() { log.debug("File version: " + fileInfo.fileVersion); return OpenResult.SUCCESS; } catch (IOException e) { - log.error(e.getMessage()); + log.error(e.toString()); // make sure that the file is closed close(); - return new OpenResult(e.getMessage()); + return new OpenResult(e.toString()); } } @@ -165,7 +165,7 @@ public ITileDataSource getDataSource() { try { return new OverzoomTileDataSource(new MapDatabase(this), mOverZoom); } catch (IOException e) { - log.debug(e.getMessage()); + log.debug(e.toString()); } return null; } @@ -177,7 +177,7 @@ public void close() { inputChannel.close(); inputChannel = null; } catch (IOException e) { - log.error(e.getMessage()); + log.error(e.toString()); } } fileHeader = null; diff --git a/vtm/src/org/oscim/tiling/source/mapfile/MultiMapDatabase.java b/vtm/src/org/oscim/tiling/source/mapfile/MultiMapDatabase.java index 74451a648..0b19808bf 100644 --- a/vtm/src/org/oscim/tiling/source/mapfile/MultiMapDatabase.java +++ b/vtm/src/org/oscim/tiling/source/mapfile/MultiMapDatabase.java @@ -76,7 +76,7 @@ public void query(MapTile tile, ITileDataSink sink) { } sink.completed(QueryResult.SUCCESS); } catch (Throwable t) { - log.error(t.getMessage(), t); + log.error(t.toString(), t); sink.completed(QueryResult.FAILED); } } diff --git a/vtm/src/org/oscim/tiling/source/mapfile/MultiMapFileTileSource.java b/vtm/src/org/oscim/tiling/source/mapfile/MultiMapFileTileSource.java index 4bc6c0b64..61f32f926 100644 --- a/vtm/src/org/oscim/tiling/source/mapfile/MultiMapFileTileSource.java +++ b/vtm/src/org/oscim/tiling/source/mapfile/MultiMapFileTileSource.java @@ -82,7 +82,7 @@ public ITileDataSource getDataSource() { mapDatabase.restrictToZoomRange(zoomLevels[0], zoomLevels[1]); multiMapDatabase.add(mapDatabase); } catch (IOException e) { - log.debug(e.getMessage()); + log.debug(e.toString()); } } return new OverzoomTileDataSource(multiMapDatabase, mOverZoom); diff --git a/vtm/src/org/oscim/tiling/source/mapfile/ReadBuffer.java b/vtm/src/org/oscim/tiling/source/mapfile/ReadBuffer.java index fc8ca797b..1da7ad40c 100644 --- a/vtm/src/org/oscim/tiling/source/mapfile/ReadBuffer.java +++ b/vtm/src/org/oscim/tiling/source/mapfile/ReadBuffer.java @@ -91,7 +91,7 @@ public boolean readFromFile(int length) throws IOException { try { mBufferData = new byte[length]; } catch (Throwable t) { - LOG.log(Level.SEVERE, t.getMessage(), t); + LOG.log(Level.SEVERE, t.toString(), t); return false; } mBufferWrapper = ByteBuffer.wrap(mBufferData, 0, length); @@ -127,7 +127,7 @@ public boolean readFromFile(long offset, int length) throws IOException { try { mBufferData = new byte[length]; } catch (Throwable t) { - LOG.log(Level.SEVERE, t.getMessage(), t); + LOG.log(Level.SEVERE, t.toString(), t); return false; } mBufferWrapper = ByteBuffer.wrap(mBufferData, 0, length); diff --git a/vtm/src/org/oscim/utils/IOUtils.java b/vtm/src/org/oscim/utils/IOUtils.java index 9046cd11a..6a0482ad1 100644 --- a/vtm/src/org/oscim/utils/IOUtils.java +++ b/vtm/src/org/oscim/utils/IOUtils.java @@ -43,7 +43,7 @@ public static void closeQuietly(Closeable closeable) { try { closeable.close(); } catch (IOException e) { - log.debug(e.getMessage()); + log.debug(e.toString()); } } @@ -55,7 +55,7 @@ public static void closeQuietly(Socket closeable) { try { closeable.close(); } catch (IOException e) { - log.debug(e.getMessage()); + log.debug(e.toString()); } } diff --git a/vtm/src/org/oscim/utils/Utils.java b/vtm/src/org/oscim/utils/Utils.java index b8344591d..da013cb92 100644 --- a/vtm/src/org/oscim/utils/Utils.java +++ b/vtm/src/org/oscim/utils/Utils.java @@ -49,7 +49,7 @@ public static TextureItem loadTexture(String relativePathPrefix, String src, Xml return new TextureItem(potBitmap(bitmap), true); } } catch (Exception e) { - log.error("{}: missing file / {}", src, e.getMessage()); + log.error("{}: missing file / {}", src, e.toString()); } return null; }