exceptions.rst 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. .. _reference.exceptions:
  2. ==========
  3. Exceptions
  4. ==========
  5. All exceptions in the :php:ns:`Ramsey\\Uuid` namespace implement
  6. :php:interface:`Ramsey\\Uuid\\Exception\\UuidExceptionInterface`. This provides
  7. a base type you may use to catch any and all exceptions that originate from this
  8. library.
  9. .. php:namespace:: Ramsey\Uuid\Exception
  10. .. php:interface:: UuidExceptionInterface
  11. This is the interface all exceptions in ramsey/uuid must implement.
  12. .. php:exception:: BuilderNotFoundException
  13. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  14. Thrown to indicate that no suitable UUID builder could be found.
  15. .. php:exception:: DateTimeException
  16. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  17. Thrown to indicate that the PHP DateTime extension encountered an
  18. exception or error.
  19. .. php:exception:: DceSecurityException
  20. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  21. Thrown to indicate an exception occurred while dealing with DCE Security
  22. (version 2) UUIDs
  23. .. php:exception:: InvalidArgumentException
  24. Extends `InvalidArgumentException <https://www.php.net/invalidargumentexception>`_.
  25. Thrown to indicate that the argument received is not valid.
  26. .. php:exception:: InvalidBytesException
  27. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  28. Thrown to indicate that the bytes being operated on are invalid in some way.
  29. .. php:exception:: InvalidUuidStringException
  30. Extends :php:exc:`Ramsey\\Uuid\\Exception\\InvalidArgumentException`.
  31. Thrown to indicate that the string received is not a valid UUID.
  32. .. php:exception:: NameException
  33. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  34. Thrown to indicate that an error occurred while attempting to hash a
  35. namespace and name
  36. .. php:exception:: NodeException
  37. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  38. Thrown to indicate that attempting to fetch or create a node ID encountered
  39. an error.
  40. .. php:exception:: RandomSourceException
  41. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  42. Thrown to indicate that the source of random data encountered an error.
  43. .. php:exception:: TimeSourceException
  44. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  45. Thrown to indicate that the source of time encountered an error.
  46. .. php:exception:: UnableToBuildUuidException
  47. Extends `RuntimeException <https://www.php.net/runtimeexception>`_.
  48. Thrown to indicate a builder is unable to build a UUID.
  49. .. php:exception:: UnsupportedOperationException
  50. Extends `LogicException <https://www.php.net/logicexception>`_.
  51. Thrown to indicate that the requested operation is not supported.