mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 15:26:03 +03:00
Change Reader exceptions to PHPExcel_Reader_Exception
This commit is contained in:
parent
8f3640e44c
commit
e0529485b7
@ -96,13 +96,13 @@ class PHPExcel_IOFactory
|
|||||||
* @static
|
* @static
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $value
|
* @param array $value
|
||||||
* @throws Exception
|
* @throws PHPExcel_Reader_Exception
|
||||||
*/
|
*/
|
||||||
public static function setSearchLocations($value) {
|
public static function setSearchLocations($value) {
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
self::$_searchLocations = $value;
|
self::$_searchLocations = $value;
|
||||||
} else {
|
} else {
|
||||||
throw new Exception('Invalid parameter passed.');
|
throw new PHPExcel_Reader_Exception('Invalid parameter passed.');
|
||||||
}
|
}
|
||||||
} // function setSearchLocations()
|
} // function setSearchLocations()
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ class PHPExcel_IOFactory
|
|||||||
* @param PHPExcel $phpExcel
|
* @param PHPExcel $phpExcel
|
||||||
* @param string $writerType Example: Excel2007
|
* @param string $writerType Example: Excel2007
|
||||||
* @return PHPExcel_Writer_IWriter
|
* @return PHPExcel_Writer_IWriter
|
||||||
* @throws Exception
|
* @throws PHPExcel_Reader_Exception
|
||||||
*/
|
*/
|
||||||
public static function createWriter(PHPExcel $phpExcel, $writerType = '') {
|
public static function createWriter(PHPExcel $phpExcel, $writerType = '') {
|
||||||
// Search type
|
// Search type
|
||||||
@ -146,7 +146,7 @@ class PHPExcel_IOFactory
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Nothing found...
|
// Nothing found...
|
||||||
throw new Exception("No $searchType found for type $writerType");
|
throw new PHPExcel_Reader_Exception("No $searchType found for type $writerType");
|
||||||
} // function createWriter()
|
} // function createWriter()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -156,7 +156,7 @@ class PHPExcel_IOFactory
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $readerType Example: Excel2007
|
* @param string $readerType Example: Excel2007
|
||||||
* @return PHPExcel_Reader_IReader
|
* @return PHPExcel_Reader_IReader
|
||||||
* @throws Exception
|
* @throws PHPExcel_Reader_Exception
|
||||||
*/
|
*/
|
||||||
public static function createReader($readerType = '') {
|
public static function createReader($readerType = '') {
|
||||||
// Search type
|
// Search type
|
||||||
@ -175,7 +175,7 @@ class PHPExcel_IOFactory
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Nothing found...
|
// Nothing found...
|
||||||
throw new Exception("No $searchType found for type $readerType");
|
throw new PHPExcel_Reader_Exception("No $searchType found for type $readerType");
|
||||||
} // function createReader()
|
} // function createReader()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,7 +185,7 @@ class PHPExcel_IOFactory
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $pFileName The name of the spreadsheet file
|
* @param string $pFileName The name of the spreadsheet file
|
||||||
* @return PHPExcel
|
* @return PHPExcel
|
||||||
* @throws Exception
|
* @throws PHPExcel_Reader_Exception
|
||||||
*/
|
*/
|
||||||
public static function load($pFilename) {
|
public static function load($pFilename) {
|
||||||
$reader = self::createReaderForFile($pFilename);
|
$reader = self::createReaderForFile($pFilename);
|
||||||
@ -199,7 +199,7 @@ class PHPExcel_IOFactory
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $pFileName The name of the spreadsheet file to identify
|
* @param string $pFileName The name of the spreadsheet file to identify
|
||||||
* @return string
|
* @return string
|
||||||
* @throws Exception
|
* @throws PHPExcel_Reader_Exception
|
||||||
*/
|
*/
|
||||||
public static function identify($pFilename) {
|
public static function identify($pFilename) {
|
||||||
$reader = self::createReaderForFile($pFilename);
|
$reader = self::createReaderForFile($pFilename);
|
||||||
@ -216,7 +216,7 @@ class PHPExcel_IOFactory
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $pFileName The name of the spreadsheet file
|
* @param string $pFileName The name of the spreadsheet file
|
||||||
* @return PHPExcel_Reader_IReader
|
* @return PHPExcel_Reader_IReader
|
||||||
* @throws Exception
|
* @throws PHPExcel_Reader_Exception
|
||||||
*/
|
*/
|
||||||
public static function createReaderForFile($pFilename) {
|
public static function createReaderForFile($pFilename) {
|
||||||
|
|
||||||
@ -283,6 +283,6 @@ class PHPExcel_IOFactory
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Exception('Unable to identify a reader for this file');
|
throw new PHPExcel_Reader_Exception('Unable to identify a reader for this file');
|
||||||
} // function createReaderForFile()
|
} // function createReaderForFile()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user