/** * Constructor * * This method initializes a new {@see \Lingua\Exception\DirectoryNotWritable} exception by * accepting a directory path or no parameter in case the directory path was missing. * * An appropriate error message will be set. * * @param string $directory */ public function __construct(string $directory = null) { if (is_string($directory) === true) { $this->directory = $directory; parent::__construct('The destination directory ' . $directory . ' is not writable.'); } else { parent::__construct('The destination directory is not writable.'); } }
/** * Constructor * * This method initializes a new {@see \Lingua\Exception\FileNotFound} exceptioon by * accepting a file path or no parameter in case the file path was missing. * * An appropriate error message will be set. * * @param string $directory */ public function __construct(string $file = null) { if (is_string($file) === true) { $this->filePath = $file; parent::__construct('The file ' . $file . ' could not be found. Please check the consistency of the library.'); } else { parent::__construct('A file could not be found. Please check the consistency of the library.'); } }
/** * Constructor * * This method initializes a new {@see \Lingua\Exception\SourceAlreadyAdded} exception and * provides an appropriate error message. */ public function __construct() { parent::__construct('The source is already registered in this setup object.'); }
/** * Constructor * * This method initializes a new {@see \Lingua\Exception\SourceNotFound} exception and provides * an appropriate error message. */ public function __construct() { parent::__construct('The requested source could not be found.'); }
/** * Constructor * * This method initializes a new {@see \Lingua\Exception\VariableUninitialized} exception and * provides an appropriate error message. */ public function __construct() { parent::__construct('A setter precondition for the execution of this method has not been met.'); }
/** * Constructor * * This method initializes a new {@see \Lingua\Exception\DecompressingFailed} exception by * accepting the path of the problematic zip file. * * @param string $zipFile */ public function __construct(string $zipFile) { $this->zipFile = $zipFile; parent::__construct('The decompressing process for the zip file ' . $zipFile . ' failed.'); }