Clean up the hprof implementation a bit.

Change-Id: I9e6622cd5ec10fe8af6553f72095bf3dee00afdd
diff --git a/src/native/dalvik_system_VMDebug.cc b/src/native/dalvik_system_VMDebug.cc
index bb6f8bc..9b10cda 100644
--- a/src/native/dalvik_system_VMDebug.cc
+++ b/src/native/dalvik_system_VMDebug.cc
@@ -178,21 +178,11 @@
     }
   }
 
-  int result = hprof::DumpHeap(filename.c_str(), fd, false);
-  if (result != 0) {
-    // TODO: ideally we'd throw something more specific based on actual failure
-    Thread::Current()->ThrowNewExceptionF("Ljava/lang/RuntimeException;", "Failure during heap dump; check log output for details: %d", result);
-    return;
-  }
+  hprof::DumpHeap(filename.c_str(), fd, false);
 }
 
 static void VMDebug_dumpHprofDataDdms(JNIEnv*, jclass) {
-  int result = hprof::DumpHeap("[DDMS]", -1, true);
-  if (result != 0) {
-    // TODO: ideally we'd throw something more specific based on actual failure
-    Thread::Current()->ThrowNewExceptionF("Ljava/lang/RuntimeException;", "Failure during heap dump; check log output for details: %d", result);
-    return;
-  }
+  hprof::DumpHeap("[DDMS]", -1, true);
 }
 
 static void VMDebug_dumpReferenceTables(JNIEnv* env, jclass) {