Show
Ignore:
Timestamp:
12.06.2008 11:52:16 (7 months ago)
Author:
m
Message:

Tagging 2.2.0 release

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/File/Bittorrent/Encode.php

    r76 r84  
    4646*/ 
    4747require_once 'PEAR.php'; 
     48require_once 'File/Bittorrent/Exception.php'; 
    4849 
    4950/** 
     
    7273    * @param mixed    Variable to encode 
    7374    * @return string 
     75    * @throws File_Bittorrent_Exception if unsupported type should be encoded 
    7476    */ 
    7577    function encode($mixed) 
     
    8688            return $this->encode_array($mixed); 
    8789        default: 
    88             PEAR::raiseError('File_Bittorrent_Encode::encode() - Unsupported type.', null, null, "Variable must be one of 'string', 'integer', 'double' or 'array'"); 
     90            throw new File_Bittorrent_Exception('Unsupported type. Variable must be one of \'string\', \'integer\', \'double\' or \'array\'', File_Bittorrent_Exception::encode); 
    8991        } 
    9092    } 
     
    139141    * @return string 
    140142    */ 
    141     function encode_array($array) 
     143    function encode_array(array $array) 
    142144    { 
    143145        // Check for strings in the keys