Show
Ignore:
Timestamp:
01/21/2008 10:33:19 AM (10 months ago)
Author:
Geert
Message:

Kohana::auto_load() now throws an exception if the needed file does not exist.

This fixes proper exception handling on all the driver based libraries: Archive, Cache, Database, Image, Payment and Session.
See for example: http://trac.kohanaphp.com/browser/trunk/system/libraries/Session.php?rev=1745#L63

Also changed code and lang files to be more consistent.

Files:
1 modified

Legend:

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

    r1565 r1772  
    6666                try 
    6767                { 
    68                         // Create the driver class name 
    69                         $driver = 'Image_'.ucfirst($this->config['driver']).'_Driver'; 
     68                        // Set driver name 
     69                        $driver = 'Image_'.ucfirst(strtolower($this->config['driver'])).'_Driver'; 
    7070 
    7171                        // Manually autoload so that exceptions can be caught 
     
    7474                catch (Kohana_Exception $e) 
    7575                { 
    76                         // Driver was not found 
    77                         throw new Kohana_Exception('cache.driver_not_supported', $this->config['driver']); 
     76                        throw new Kohana_Exception('image.driver_not_supported', $this->config['driver']); 
    7877                } 
    7978