Skip to content

Commit

Permalink
Don't crash when heap dump fails square#226
Browse files Browse the repository at this point in the history
  • Loading branch information
pyricau committed Aug 28, 2015
1 parent 60bf248 commit 35dd5ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/squareup/leakcanary/AndroidHeapDumper.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.squareup.leakcanary.internal.FutureResult;
import com.squareup.leakcanary.internal.LeakCanaryInternals;
import java.io.File;
import java.io.IOException;

import static com.squareup.leakcanary.internal.LeakCanaryInternals.isExternalStorageWritable;
import static com.squareup.leakcanary.internal.LeakCanaryInternals.storageDirectory;
Expand Down Expand Up @@ -69,7 +68,7 @@ public AndroidHeapDumper(Context context) {
Debug.dumpHprofData(heapDumpFile.getAbsolutePath());
cancelToast(toast);
return heapDumpFile;
} catch (IOException e) {
} catch (Exception e) {
cleanup();
Log.e(TAG, "Could not perform heap dump", e);
// Abort heap dump
Expand Down

0 comments on commit 35dd5ea

Please sign in to comment.