Bitrix-D7  20.0.0
ioexception.php
См. документацию.
1 <?php
2 namespace Bitrix\Main\IO;
3 
4 /**
5  * This exception is thrown when an I/O error occurs.
6  */
8 {
9  protected $path;
10 
11  /**
12  * Creates new exception object.
13  *
14  * @param string $message Exception message
15  * @param string $path Path that generated exception.
16  * @param \Exception $previous
17  */
18  public function __construct($message = "", $path = "", \Exception $previous = null)
19  {
20  parent::__construct($message, 120, '', 0, $previous);
21  $this->path = $path;
22  }
23 
24  /**
25  * Path that generated exception.
26  *
27  * @return string
28  */
29  public function getPath()
30  {
31  return $this->path;
32  }
33 }
34 
36 {
37  public function __construct($path, \Exception $previous = null)
38  {
39  $message = sprintf("Path '%s' is invalid.", $path);
40  parent::__construct($message, $path, $previous);
41  }
42 }
43 
45 {
46  public function __construct($path, \Exception $previous = null)
47  {
48  $message = sprintf("Path '%s' is not found.", $path);
49  parent::__construct($message, $path, $previous);
50  }
51 }
52 
54 {
55  public function __construct($path, \Exception $previous = null)
56  {
57  $message = sprintf("Error occurred during deleting file '%s'.", $path);
58  parent::__construct($message, $path, $previous);
59  }
60 }
61 
63 {
64  public function __construct($path, \Exception $previous = null)
65  {
66  $message = sprintf("Cannot open the file '%s'.", $path);
67  parent::__construct($message, $path, $previous);
68  }
69 }
70 
72 {
73  public function __construct($path, \Exception $previous = null)
74  {
75  $message = sprintf("The file '%s' is not opened.", $path);
76  parent::__construct($message, $path, $previous);
77  }
78 }
Bitrix\Main\IO\IoException
This exception is thrown when an I/O error occurs.
Definition: ioexception.php:7
Bitrix\Main\IO\IoException\$path
$path
Definition: ioexception.php:9
Bitrix\Main\IO\FileNotFoundException
Definition: ioexception.php:44
Bitrix\Main\IO\FileDeleteException\__construct
__construct($path, \Exception $previous=null)
Definition: ioexception.php:55
Bitrix\Main\IO\InvalidPathException
Definition: ioexception.php:35
Bitrix\Main\IO\IoException\getPath
getPath()
Path that generated exception.
Definition: ioexception.php:29
Bitrix\Main\IO\FileNotOpenedException
Definition: ioexception.php:71
Bitrix\Main\IO\FileNotFoundException\__construct
__construct($path, \Exception $previous=null)
Definition: ioexception.php:46
Bitrix\Main\IO\InvalidPathException\__construct
__construct($path, \Exception $previous=null)
Definition: ioexception.php:37
Bitrix\Main\IO\FileOpenException\__construct
__construct($path, \Exception $previous=null)
Definition: ioexception.php:64
Bitrix\Main\SystemException
Base class for fatal exceptions.
Definition: main/lib/exception.php:7
Bitrix\Sender\Connector\__construct
__construct(Base $connector)
Constructor.
Definition: resultview.php:40
Bitrix\Main\IO
Definition: main/lib/io/directory.php:2
Bitrix\Main\IO\FileDeleteException
Definition: ioexception.php:53
Bitrix\Main\IO\FileOpenException
Definition: ioexception.php:62
Bitrix\Main\IO\IoException\__construct
__construct($message="", $path="", \Exception $previous=null)
Creates new exception object.
Definition: ioexception.php:18
Bitrix\Main\IO\FileNotOpenedException\__construct
__construct($path, \Exception $previous=null)
Definition: ioexception.php:73