]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
ensure*() functions throw exceptions for errors
authorEvan Prodromou <evan@status.net>
Wed, 9 Feb 2011 08:08:52 +0000 (03:08 -0500)
committerEvan Prodromou <evan@status.net>
Wed, 9 Feb 2011 08:08:52 +0000 (03:08 -0500)
plugins/OStatus/classes/Ostatus_profile.php

index 13711d39f4cd6314d7f09043d73c65d57ce0c0e3..28f2dc0a9774327a9875d35fb2df93e7cc18f398 100644 (file)
@@ -1782,12 +1782,14 @@ class Ostatus_profile extends Memcached_DataObject
                     $oprofile = Ostatus_profile::ensureWebfinger($rest);
                     break;
                 default:
-                    common_log(LOG_WARNING,
-                               "Unrecognized URI protocol for profile: $protocol ($uri)");
+                    throw new ServerException("Unrecognized URI protocol for profile: $protocol ($uri)");
                     break;
                 }
+            } else {
+                throw new ServerException("No URI protocol for profile: ($uri)");
             }
         }
+
         return $oprofile;
     }