List of usage examples for java.io NotSerializableException getLocalizedMessage
public String getLocalizedMessage()
From source file:com.adjust.sdk.PackageHandler.java
private void writePackageQueue() { if (dropOfflineActivities) { return; // don't write packages when offline tracking is disabled }//ww w . j a v a 2 s .c o m try { FileOutputStream outputStream = context.openFileOutput(PACKAGE_QUEUE_FILENAME, Context.MODE_PRIVATE); BufferedOutputStream bufferedStream = new BufferedOutputStream(outputStream); ObjectOutputStream objectStream = new ObjectOutputStream(bufferedStream); try { objectStream.writeObject(packageQueue); logger.debug("Package handler wrote %d packages", packageQueue.size()); } catch (NotSerializableException e) { logger.error("Failed to serialize packages"); } finally { objectStream.close(); } } catch (Exception e) { logger.error("Failed to write packages (%s)", e.getLocalizedMessage()); e.printStackTrace(); } }