ensure*() functions throw exceptions for errors
This commit is contained in:
		@@ -1782,12 +1782,14 @@ class Ostatus_profile extends Memcached_DataObject
 | 
				
			|||||||
                    $oprofile = Ostatus_profile::ensureWebfinger($rest);
 | 
					                    $oprofile = Ostatus_profile::ensureWebfinger($rest);
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                default:
 | 
					                default:
 | 
				
			||||||
                    common_log(LOG_WARNING,
 | 
					                    throw new ServerException("Unrecognized URI protocol for profile: $protocol ($uri)");
 | 
				
			||||||
                               "Unrecognized URI protocol for profile: $protocol ($uri)");
 | 
					 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                throw new ServerException("No URI protocol for profile: ($uri)");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $oprofile;
 | 
					        return $oprofile;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user