diff --git a/src/jni_internal.cc b/src/jni_internal.cc
index a55cdae..6acfb71 100644
--- a/src/jni_internal.cc
+++ b/src/jni_internal.cc
@@ -38,7 +38,7 @@
   size_t length = assembler.CodeSize();
   void* addr = mmap(NULL, length, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
   if (addr == MAP_FAILED) {
-    PLOG(FATAL) << "mmap failed";
+    PLOG(FATAL) << "mmap failed for " << PrettyMethod(method, true);
   }
   MemoryRegion region(addr, length);
   assembler.FinalizeInstructions(region);
@@ -405,8 +405,8 @@
   if (method->GetCode()) {
     (*stub)(method, rcvr, self, args, &result);
   } else {
-    // TODO: pretty print method here
-    LOG(WARNING) << "Not invoking method with no associated code";
+    LOG(WARNING) << "Not invoking method with no associated code: "
+                 << PrettyMethod(method, true);
     result.j = 0;
   }
   // Pop transition
@@ -472,12 +472,12 @@
 
   if (method == NULL || method->IsStatic() != is_static) {
     Thread* self = Thread::Current();
-    std::string class_name(c->GetDescriptor()->ToModifiedUtf8());
+    std::string method_name(PrettyMethod(method, true));
     // TODO: try searching for the opposite kind of method from is_static
     // for better diagnostics?
     self->ThrowNewException("Ljava/lang/NoSuchMethodError;",
-        "no %s method \"%s.%s%s\"", is_static ? "static" : "non-static",
-        class_name.c_str(), name, sig);
+        "no %s method %s", is_static ? "static" : "non-static",
+        method_name.c_str());
     return NULL;
   }
 
@@ -2004,7 +2004,6 @@
       if (method == NULL) {
         Thread* self = Thread::Current();
         std::string class_name = klass->GetDescriptor()->ToModifiedUtf8();
-        // TODO: pretty print method names through a single routine
         self->ThrowNewException("Ljava/lang/NoSuchMethodError;",
             "no method \"%s.%s%s\"",
             class_name.c_str(), name, sig);
@@ -2012,7 +2011,6 @@
       } else if (!method->IsNative()) {
         Thread* self = Thread::Current();
         std::string class_name = klass->GetDescriptor()->ToModifiedUtf8();
-        // TODO: pretty print method names through a single routine
         self->ThrowNewException("Ljava/lang/NoSuchMethodError;",
             "method \"%s.%s%s\" is not native",
             class_name.c_str(), name, sig);
diff --git a/src/main.cc b/src/main.cc
index 381f8f7..b4eb151 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -53,7 +53,12 @@
     return false;
   }
   static const int PUBLIC = 0x0001;   // java.lang.reflect.Modifiers.PUBLIC
+#if 0 // CallIntMethod not yet implemented
   int modifiers = env->CallIntMethod(method.get(), get_modifiers);
+#else
+  int modifiers = PUBLIC;
+  UNIMPLEMENTED(WARNING) << "assuming main is public...";
+#endif
   if ((modifiers & PUBLIC) == 0) {
     return false;
   }
diff --git a/src/utils.cc b/src/utils.cc
index 058ca83..67d5780 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -54,6 +54,22 @@
   return result;
 }
 
+std::string PrettyMethod(const Method* m, bool with_signature) {
+  if (m == NULL) {
+    return "null";
+  }
+  Class* c = m->GetDeclaringClass();
+  std::string result(PrettyDescriptor(c->GetDescriptor()->ToModifiedUtf8()));
+  result += '.';
+  result += m->GetName()->ToModifiedUtf8();
+  if (with_signature) {
+    // TODO: iterate over the signature's elements and pass them all to
+    // PrettyDescriptor? We'd need to pull out the return type specially, too.
+    result += m->GetSignature()->ToModifiedUtf8();
+  }
+  return result;
+}
+
 std::string PrettyType(const Object* obj) {
   if (obj == NULL) {
     return "null";
diff --git a/src/utils.h b/src/utils.h
index ea51d1e..541fbfa 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -10,6 +10,7 @@
 
 namespace art {
 
+class Method;
 class Object;
 
 template<typename T>
@@ -135,13 +136,17 @@
   return result;
 }
 
-// Return a newly-allocated string containing a human-readable equivalent
-// of 'descriptor'. So "I" would be "int", "[[I" would be "int[][]",
-// "[Ljava/lang/String;" would be "java.lang.String[]", and so forth.
+// Returns a human-readable equivalent of 'descriptor'. So "I" would be "int",
+// "[[I" would be "int[][]", "[Ljava/lang/String;" would be
+// "java.lang.String[]", and so forth.
 std::string PrettyDescriptor(const StringPiece& descriptor);
 
-// Returns a human-readable string form of the name of the class of
-// the given object. So given a java.lang.String, the output would
+// Returns a human-readable signature for 'm'. Something like "a.b.C.m" or
+// "a.b.C.m(II)V" (depending on the value of 'with_signature').
+std::string PrettyMethod(const Method* m, bool with_signature);
+
+// Returns a human-readable form of the name of the *class* of the given object.
+// So given an instance of java.lang.String, the output would
 // be "java.lang.String". Given an array of int, the output would be "int[]".
 // Given String.class, the output would be "java.lang.Class<java.lang.String>".
 std::string PrettyType(const Object* obj);
