Team Ai
Apppublic

errorcode418/php

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
FileNotFoundException.php40 linesDownload Raw Back to Exception
1<?php2/**3 * ua-parser4 *5 * Copyright (c) 2011-2012 Dave Olsen, http://dmolsen.com6 *7 * Released under the MIT license8 */9namespace UAParser\Exception;10 11use Exception;12 13class FileNotFoundException extends Exception14{15    public static function fileNotFound($file)16    {17        return new static(sprintf('File "%s" does not exist', $file));18    }19 20    public static function customRegexFileNotFound($file)21    {22        return new static(23            sprintf(24                'ua-parser cannot find the custom regexes file you supplied ("%s"). Please make sure you have the correct path.',25                $file26            )27        );28    }29 30    public static function defaultFileNotFound($file)31    {32        return new static(33            sprintf(34                'Please download the "%s" file before using ua-parser by running "php bin/uaparser ua-parser:update"',35                $file36            )37        );38    }39}40