From 5b98e8cd1456e783545ad8c21cc2aac1959bdf65 Mon Sep 17 00:00:00 2001 From: Charles Sprayberry Date: Sat, 13 May 2017 00:23:17 -0400 Subject: [PATCH] bring exceptions over from labrador/core --- .gitignore | 9 +++++++++ CHANGELOG.md | 7 +++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 9 +++++++++ composer.json | 21 +++++++++++++++++++++ composer.lock | 19 +++++++++++++++++++ src/Exception.php | 16 ++++++++++++++++ src/InvalidArgumentException.php | 14 ++++++++++++++ src/InvalidTypeException.php | 11 +++++++++++ src/NotFoundException.php | 14 ++++++++++++++ 10 files changed, 141 insertions(+) create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 src/Exception.php create mode 100644 src/InvalidArgumentException.php create mode 100644 src/InvalidTypeException.php create mode 100644 src/NotFoundException.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85d2000 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +. +.. +.DS_Store +.vagrant +.idea +/vendor +/build +Vagrantfile +/puphpet \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..447f181 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +## v1.0.0 - 2017-05-13 + +- Added NotFoundException +- Added InvalidArgumentException +- Added InvalidTypeException \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e251a6a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Charles Sprayberry + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..91c6c21 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Labrador Exceptions + +A library holding generic exceptions used throughout Labrador libraries. + +Unless you're working on Labrador internals there's probably no need for +you to install this library. If you are working on Labrador internals please +install via Composer. + + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..5250dcb --- /dev/null +++ b/composer.json @@ -0,0 +1,21 @@ +{ + "name": "cspray/labrador-exceptions", + "description": "", + "license": "MIT", + "authors": [ + { + "name": "Charles Sprayberry", + "email": "cspray+labrador@gmail.com", + "homepage": "http://labrador.cspray.net", + "role": "Benevolent Dictator For Life" + } + ], + "require": { + "php": "~7.1" + }, + "autoload": { + "psr-4": { + "Cspray\\Labrador\\Exception\\": ["src/"] + } + } +} \ No newline at end of file diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..6a98371 --- /dev/null +++ b/composer.lock @@ -0,0 +1,19 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "b7e7b54a6729139f4efd79fab1ca0f31", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "~7.1" + }, + "platform-dev": [] +} diff --git a/src/Exception.php b/src/Exception.php new file mode 100644 index 0000000..685898e --- /dev/null +++ b/src/Exception.php @@ -0,0 +1,16 @@ +