IOException.php 553 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Exception class thrown when a filesystem access failure happens
  4. */
  5. class IOException extends Exception
  6. {
  7. private $path;
  8. /**
  9. * Construct a new IOException
  10. *
  11. * @param string $path path to the resource that cannot be accessed
  12. * @param string $message Custom exception message.
  13. */
  14. public function __construct($path, $message = '')
  15. {
  16. $this->path = $path;
  17. $this->message = empty($message) ? t('Error accessing') : $message;
  18. $this->message .= ' "' . $this->path .'"';
  19. }
  20. }