Show
Ignore:
Timestamp:
05/13/08 02:23:53 (4 months ago)
Author:
Geert
Message:

Follow-up to r2628. Using generic i18n messages for loading of drivers.

Location:
trunk/system/libraries
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Archive.php

    r2016 r2667  
    3434        // Load the driver 
    3535        if ( ! Kohana::auto_load($driver)) 
    36             throw new Kohana_Exception('archive.driver_not_supported', $type); 
     36            throw new Kohana_Exception('core.driver_not_found', $type, get_class($this)); 
    3737 
    3838        // Initialize the driver 
     
    4141        // Validate the driver 
    4242        if ( ! ($this->driver instanceof Archive_Driver)) 
    43             throw new Kohana_Exception('archive.driver_implements', $type); 
     43            throw new Kohana_Exception('core.driver_implements', $type, get_class($this), 'Archive_Driver'); 
    4444 
    4545        Log::add('debug', 'Archive Library initialized'); 
  • trunk/system/libraries/Cache.php

    r2593 r2667  
    6969        // Load the driver 
    7070        if ( ! Kohana::auto_load($driver)) 
    71             throw new Kohana_Exception('cache.driver_not_supported', $this->config['driver']); 
     71            throw new Kohana_Exception('core.driver_not_found', $this->config['driver'], get_class($this)); 
    7272 
    7373        // Initialize the driver 
     
    7676        // Validate the driver 
    7777        if ( ! ($this->driver instanceof Cache_Driver)) 
    78             throw new Kohana_Exception('cache.driver_implements', $this->config['driver']); 
     78            throw new Kohana_Exception('core.driver_implements', $this->config['driver'], get_class($this), 'Cache_Driver'); 
    7979 
    8080        Log::add('debug', 'Cache Library initialized'); 
  • trunk/system/libraries/Database.php

    r2593 r2667  
    179179        // Load the driver 
    180180        if ( ! Kohana::auto_load($driver)) 
    181             throw new Kohana_Database_Exception('database.driver_not_supported', $this->config['connection']['type']); 
     181            throw new Kohana_Database_Exception('core.driver_not_found', $this->config['connection']['type'], get_class($this)); 
    182182 
    183183        // Initialize the driver 
     
    186186        // Validate the driver 
    187187        if ( ! ($this->driver instanceof Database_Driver)) 
    188             throw new Kohana_Database_Exception('database.driver_not_supported', 'Database drivers must use the Database_Driver interface.'); 
     188            throw new Kohana_Database_Exception('core.driver_implements', $this->config['connection']['type'], get_class($this), 'Database_Driver'); 
    189189 
    190190        Log::add('debug', 'Database Library initialized'); 
  • trunk/system/libraries/Image.php

    r2593 r2667  
    111111        // Load the driver 
    112112        if ( ! Kohana::auto_load($driver)) 
    113             throw new Kohana_Exception('image.driver_not_supported', $this->config['driver']); 
     113            throw new Kohana_Exception('core.driver_not_found', $this->config['driver'], get_class($this)); 
    114114 
    115115        // Initialize the driver 
    116116        $this->driver = new $driver($this->config['params']); 
    117117 
     118        // Validate the driver 
    118119        if ( ! ($this->driver instanceof Image_Driver)) 
    119             throw new Kohana_Exception('image.invalid_driver', $driver); 
     120            throw new Kohana_Exception('core.driver_implements', $this->config['driver'], get_class($this), 'Image_Driver'); 
    120121    } 
    121122 
  • trunk/system/libraries/Payment.php

    r2209 r2667  
    7575        // Load the driver 
    7676        if ( ! Kohana::auto_load($driver)) 
    77             throw new Kohana_Exception('payment.driver_not_supported', $this->config['driver']); 
     77            throw new Kohana_Exception('core.driver_not_found', $this->config['driver'], get_class($this)); 
    7878 
    7979        // Get the driver specific settings 
     
    8585        // Validate the driver 
    8686        if ( ! ($this->driver instanceof Payment_Driver)) 
    87             throw new Kohana_Exception('payment.driver_implements', $this->config['driver']); 
     87            throw new Kohana_Exception('core.driver_implements', $this->config['driver'], get_class($this), 'Payment_Driver'); 
    8888    } 
    8989 
  • trunk/system/libraries/Session.php

    r2649 r2667  
    6262                // Load the driver 
    6363                if ( ! Kohana::auto_load($driver)) 
    64                     throw new Kohana_Exception('session.driver_not_supported', self::$config['driver']); 
     64                    throw new Kohana_Exception('core.driver_not_found', self::$config['driver'], get_class($this)); 
    6565 
    6666                // Initialize the driver 
     
    6969                // Validate the driver 
    7070                if ( ! (self::$driver instanceof Session_Driver)) 
    71                     throw new Kohana_Exception('session.driver_implements', self::$config['driver']); 
     71                    throw new Kohana_Exception('core.driver_implements', self::$config['driver'], get_class($this), 'Session_Driver'); 
    7272 
    7373                // Register non-native driver as the session handler