File tree Expand file tree Collapse file tree 5 files changed +50
-50
lines changed
Expand file tree Collapse file tree 5 files changed +50
-50
lines changed Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- /**
6- * PHP simple library for managing JSON files.
5+ /*
6+ * This file is part of https://github.com/josantonius/php-json repository.
7+ *
8+ * (c) Josantonius <hello@josantonius.dev>
79 *
8- * @author Josantonius <hello@josantonius.dev>
9- * @copyright 2016 (c) Josantonius
10- * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11- * @link https://github.com/josantonius/php-json
12- * @since 2.0.0
10+ * For the full copyright and license information, please view the LICENSE
11+ * file that was distributed with this source code.
1312 */
13+
1414namespace Josantonius \Json \Exception ;
1515
1616/**
1717 * You can use an exception and error handler with this library.
1818 *
19- * @link https://github.com/josantonius/php-errorhandler
19+ * @see https://github.com/josantonius/php-error-handler
2020 */
2121class CreateDirectoryException extends \Exception
2222{
23- public function __construct (string $ path, \ Throwable $ th = null )
23+ public function __construct (string $ path )
2424 {
2525 $ lastError = error_get_last ()['message ' ] ?? '' ;
2626
2727 $ message = "Could not create directory in ' $ path'. " ;
2828 $ message .= $ lastError ? " $ lastError. " : '' ;
2929
30- parent ::__construct ($ th ? $ th -> getMessage () : $ message, 0 , $ th );
30+ parent ::__construct ($ message );
3131 }
3232}
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- /**
6- * PHP simple library for managing JSON files.
5+ /*
6+ * This file is part of https://github.com/josantonius/php-json repository.
7+ *
8+ * (c) Josantonius <hello@josantonius.dev>
79 *
8- * @author Josantonius <hello@josantonius.dev>
9- * @copyright 2016 (c) Josantonius
10- * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11- * @link https://github.com/josantonius/php-json
12- * @since 2.0.0
10+ * For the full copyright and license information, please view the LICENSE
11+ * file that was distributed with this source code.
1312 */
13+
1414namespace Josantonius \Json \Exception ;
1515
1616/**
1717 * You can use an exception and error handler with this library.
1818 *
19- * @link https://github.com/josantonius/php-errorhandler
19+ * @see https://github.com/josantonius/php-error-handler
2020 */
2121class CreateFileException extends \Exception
2222{
23- public function __construct (string $ filepath, \ Throwable $ th = null )
23+ public function __construct (string $ filepath )
2424 {
2525 $ lastError = error_get_last ()['message ' ] ?? '' ;
2626
2727 $ message = "Could not create file ' $ filepath'. " ;
2828 $ message .= $ lastError ? " $ lastError. " : '' ;
2929
30- parent ::__construct ($ th ? $ th -> getMessage () : $ message, 0 , $ th );
30+ parent ::__construct ($ message );
3131 }
3232}
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- /**
6- * PHP simple library for managing JSON files.
5+ /*
6+ * This file is part of https://github.com/josantonius/php-json repository.
7+ *
8+ * (c) Josantonius <hello@josantonius.dev>
79 *
8- * @author Josantonius <hello@josantonius.dev>
9- * @copyright 2016 (c) Josantonius
10- * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11- * @link https://github.com/josantonius/php-json
12- * @since 2.0.0
10+ * For the full copyright and license information, please view the LICENSE
11+ * file that was distributed with this source code.
1312 */
13+
1414namespace Josantonius \Json \Exception ;
1515
1616/**
1717 * You can use an exception and error handler with this library.
1818 *
19- * @link https://github.com/josantonius/php-errorhandler
19+ * @see https://github.com/josantonius/php-error-handler
2020 */
2121class GetFileException extends \Exception
2222{
23- public function __construct (string $ filepath, \ Throwable $ th = null )
23+ public function __construct (string $ filepath )
2424 {
2525 $ lastError = error_get_last ()['message ' ] ?? '' ;
2626
2727 $ message = "Error reading file: ' $ filepath'. " ;
2828 $ message .= $ lastError ? " $ lastError. " : '' ;
2929
30- parent ::__construct ($ th ? $ th -> getMessage () : $ message, 0 , $ th );
30+ parent ::__construct ($ message );
3131 }
3232}
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- /**
6- * PHP simple library for managing JSON files.
5+ /*
6+ * This file is part of https://github.com/josantonius/php-json repository.
7+ *
8+ * (c) Josantonius <hello@josantonius.dev>
79 *
8- * @author Josantonius <hello@josantonius.dev>
9- * @copyright 2016 (c) Josantonius
10- * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11- * @link https://github.com/josantonius/php-json
12- * @since 2.0.0
10+ * For the full copyright and license information, please view the LICENSE
11+ * file that was distributed with this source code.
1312 */
13+
1414namespace Josantonius \Json \Exception ;
1515
1616/**
1717 * You can use an exception and error handler with this library.
1818 *
19- * @link https://github.com/josantonius/php-errorhandler
19+ * @see https://github.com/josantonius/php-error-handler
2020 */
2121class JsonErrorException extends \Exception
2222{
23- public function __construct (\ Throwable $ th = null )
23+ public function __construct ()
2424 {
2525 $ message = 'JSON error: ' . json_last_error_msg ();
2626
27- parent ::__construct ($ th ? $ th -> getMessage () : $ message, 0 , $ th );
27+ parent ::__construct ($ message );
2828 }
2929}
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- /**
6- * PHP simple library for managing JSON files.
5+ /*
6+ * This file is part of https://github.com/josantonius/php-json repository.
7+ *
8+ * (c) Josantonius <hello@josantonius.dev>
79 *
8- * @author Josantonius <hello@josantonius.dev>
9- * @copyright 2016 (c) Josantonius
10- * @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11- * @link https://github.com/josantonius/php-json
12- * @since 2.0.0
10+ * For the full copyright and license information, please view the LICENSE
11+ * file that was distributed with this source code.
1312 */
13+
1414namespace Josantonius \Json \Exception ;
1515
1616/**
1717 * You can use an exception and error handler with this library.
1818 *
19- * @link https://github.com/josantonius/php-errorhandler
19+ * @see https://github.com/josantonius/php-error-handler
2020 */
2121class UnavailableMethodException extends \Exception
2222{
23- public function __construct (string $ method, \ Throwable $ th = null )
23+ public function __construct (string $ method )
2424 {
2525 $ message = 'The " ' . $ method . '" method is not available for remote JSON files. ' ;
2626
27- parent ::__construct ($ th ? $ th -> getMessage () : $ message, 0 , $ th );
27+ parent ::__construct ($ message );
2828 }
2929}
You can’t perform that action at this time.
0 commit comments