Cleanup on exceptions
[civicrm-core.git] / CRM / Core / Resources / Strings.php
index 913483ba7dc5228c2c24e5a96e6b79e99f4c2fb0..7ff24211bff566e2a6d076371853a12dc14f3e6c 100644 (file)
@@ -68,7 +68,7 @@ class CRM_Core_Resources_Strings {
    * @return array
    *   List of translatable strings.
    *
-   * @throws \Exception
+   * @throws \CRM_Core_Exception
    */
   public function get($bucket, $file, $format) {
     // array($file => array(...strings...))
@@ -97,7 +97,8 @@ class CRM_Core_Resources_Strings {
    *   Type of file (e.g. 'text/javascript', 'text/html').
    * @return array
    *   List of translatable strings.
-   * @throws Exception
+   *
+   * @throws CRM_Core_Exception
    */
   public function extract($file, $format) {
     switch ($format) {
@@ -109,7 +110,7 @@ class CRM_Core_Resources_Strings {
         return CRM_Utils_JS::parseStrings(file_get_contents($file));
 
       default:
-        throw new Exception("Cannot extract strings: Unrecognized file type.");
+        throw new CRM_Core_Exception('Cannot extract strings: Unrecognized file type.');
     }
   }