aboutsummaryrefslogtreecommitdiffstats
path: root/library/symfony/options-resolver/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'library/symfony/options-resolver/Exception')
-rw-r--r--library/symfony/options-resolver/Exception/AccessException.php22
-rw-r--r--library/symfony/options-resolver/Exception/ExceptionInterface.php21
-rw-r--r--library/symfony/options-resolver/Exception/InvalidArgumentException.php21
-rw-r--r--library/symfony/options-resolver/Exception/InvalidOptionsException.php23
-rw-r--r--library/symfony/options-resolver/Exception/MissingOptionsException.php23
-rw-r--r--library/symfony/options-resolver/Exception/NoSuchOptionException.php26
-rw-r--r--library/symfony/options-resolver/Exception/OptionDefinitionException.php21
-rw-r--r--library/symfony/options-resolver/Exception/UndefinedOptionsException.php24
8 files changed, 181 insertions, 0 deletions
diff --git a/library/symfony/options-resolver/Exception/AccessException.php b/library/symfony/options-resolver/Exception/AccessException.php
new file mode 100644
index 000000000..c12b68064
--- /dev/null
+++ b/library/symfony/options-resolver/Exception/AccessException.php
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when trying to read an option outside of or write it inside of
+ * {@link \Symfony\Component\OptionsResolver\Options::resolve()}.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class AccessException extends \LogicException implements ExceptionInterface
+{
+}
diff --git a/library/symfony/options-resolver/Exception/ExceptionInterface.php b/library/symfony/options-resolver/Exception/ExceptionInterface.php
new file mode 100644
index 000000000..b62bb51d4
--- /dev/null
+++ b/library/symfony/options-resolver/Exception/ExceptionInterface.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Marker interface for all exceptions thrown by the OptionsResolver component.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+interface ExceptionInterface
+{
+}
diff --git a/library/symfony/options-resolver/Exception/InvalidArgumentException.php b/library/symfony/options-resolver/Exception/InvalidArgumentException.php
new file mode 100644
index 000000000..6d421d68b
--- /dev/null
+++ b/library/symfony/options-resolver/Exception/InvalidArgumentException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when an argument is invalid.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
+{
+}
diff --git a/library/symfony/options-resolver/Exception/InvalidOptionsException.php b/library/symfony/options-resolver/Exception/InvalidOptionsException.php
new file mode 100644
index 000000000..6fd4f125f
--- /dev/null
+++ b/library/symfony/options-resolver/Exception/InvalidOptionsException.php
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when the value of an option does not match its validation rules.
+ *
+ * You should make sure a valid value is passed to the option.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class InvalidOptionsException extends InvalidArgumentException
+{
+}
diff --git a/library/symfony/options-resolver/Exception/MissingOptionsException.php b/library/symfony/options-resolver/Exception/MissingOptionsException.php
new file mode 100644
index 000000000..faa487f16
--- /dev/null
+++ b/library/symfony/options-resolver/Exception/MissingOptionsException.php
@@ -0,0 +1,23 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Exception thrown when a required option is missing.
+ *
+ * Add the option to the passed options array.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class MissingOptionsException extends InvalidArgumentException
+{
+}
diff --git a/library/symfony/options-resolver/Exception/NoSuchOptionException.php b/library/symfony/options-resolver/Exception/NoSuchOptionException.php
new file mode 100644
index 000000000..4c3280f4c
--- /dev/null
+++ b/library/symfony/options-resolver/Exception/NoSuchOptionException.php
@@ -0,0 +1,26 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when trying to read an option that has no value set.
+ *
+ * When accessing optional options from within a lazy option or normalizer you should first
+ * check whether the optional option is set. You can do this with `isset($options['optional'])`.
+ * In contrast to the {@link UndefinedOptionsException}, this is a runtime exception that can
+ * occur when evaluating lazy options.
+ *
+ * @author Tobias Schultze <http://tobion.de>
+ */
+class NoSuchOptionException extends \OutOfBoundsException implements ExceptionInterface
+{
+}
diff --git a/library/symfony/options-resolver/Exception/OptionDefinitionException.php b/library/symfony/options-resolver/Exception/OptionDefinitionException.php
new file mode 100644
index 000000000..e8e339d44
--- /dev/null
+++ b/library/symfony/options-resolver/Exception/OptionDefinitionException.php
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Thrown when two lazy options have a cyclic dependency.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class OptionDefinitionException extends \LogicException implements ExceptionInterface
+{
+}
diff --git a/library/symfony/options-resolver/Exception/UndefinedOptionsException.php b/library/symfony/options-resolver/Exception/UndefinedOptionsException.php
new file mode 100644
index 000000000..6ca3fce47
--- /dev/null
+++ b/library/symfony/options-resolver/Exception/UndefinedOptionsException.php
@@ -0,0 +1,24 @@
+<?php
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\OptionsResolver\Exception;
+
+/**
+ * Exception thrown when an undefined option is passed.
+ *
+ * You should remove the options in question from your code or define them
+ * beforehand.
+ *
+ * @author Bernhard Schussek <bschussek@gmail.com>
+ */
+class UndefinedOptionsException extends InvalidArgumentException
+{
+}