exceptions.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. /**
  3. * This file is part of the Nette Framework (https://nette.org)
  4. * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
  5. */
  6. declare(strict_types=1);
  7. namespace Nette;
  8. /**
  9. * The value is outside the allowed range.
  10. */
  11. class ArgumentOutOfRangeException extends \InvalidArgumentException
  12. {
  13. }
  14. /**
  15. * The object is in a state that does not allow the requested operation.
  16. */
  17. class InvalidStateException extends \RuntimeException
  18. {
  19. }
  20. /**
  21. * The requested feature is not implemented.
  22. */
  23. class NotImplementedException extends \LogicException
  24. {
  25. }
  26. /**
  27. * The requested operation is not supported.
  28. */
  29. class NotSupportedException extends \LogicException
  30. {
  31. }
  32. /**
  33. * The requested feature is deprecated and no longer available.
  34. */
  35. class DeprecatedException extends NotSupportedException
  36. {
  37. }
  38. /**
  39. * Cannot access the requested class property or method.
  40. */
  41. class MemberAccessException extends \Error
  42. {
  43. }
  44. /**
  45. * Failed to read from or write to a file or stream.
  46. */
  47. class IOException extends \RuntimeException
  48. {
  49. }
  50. /**
  51. * The requested file does not exist.
  52. */
  53. class FileNotFoundException extends IOException
  54. {
  55. }
  56. /**
  57. * The requested directory does not exist.
  58. */
  59. class DirectoryNotFoundException extends IOException
  60. {
  61. }
  62. /**
  63. * The provided argument has invalid type or format.
  64. */
  65. class InvalidArgumentException extends \InvalidArgumentException
  66. {
  67. }
  68. /**
  69. * The requested array or collection index does not exist.
  70. */
  71. class OutOfRangeException extends \OutOfRangeException
  72. {
  73. }
  74. /**
  75. * The returned value has unexpected type or format.
  76. */
  77. class UnexpectedValueException extends \UnexpectedValueException
  78. {
  79. }
  80. /**
  81. * Houston, we have a problem.
  82. */
  83. class ShouldNotHappenException extends \LogicException
  84. {
  85. }