dev/core#560 Replace some instances of CRM_Core_Error::fatal with an exception or...
[civicrm-core.git] / CRM / Core / DAO / Factory.php
index 66dd5a9d7495c7fc040beaf803c053c399160e91..1401d2ba1da9cce62416b9df818cf69aa02a7f9f 100644 (file)
@@ -24,12 +24,12 @@ class CRM_Core_DAO_Factory {
    * @param string $className
    *
    * @return mixed
-   * @throws Exception
+   * @throws CRM_Core_Exception
    */
   public static function create($className) {
     $type = self::$_classes[$className] ?? NULL;
     if (!$type) {
-      CRM_Core_Error::fatal("class $className not found");
+      throw new CRM_Core_Exception("class $className not found");
     }
 
     $class = self::$_prefix[$type] . $className;