exceptions.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. namespace Nette;
  7. /**
  8. * The exception that is thrown when the value of an argument is
  9. * outside the allowable range of values as defined by the invoked method.
  10. */
  11. class ArgumentOutOfRangeException extends \InvalidArgumentException
  12. {
  13. }
  14. /**
  15. * The exception that is thrown when a method call is invalid for the object's
  16. * current state, method has been invoked at an illegal or inappropriate time.
  17. */
  18. class InvalidStateException extends \RuntimeException
  19. {
  20. }
  21. /**
  22. * The exception that is thrown when a requested method or operation is not implemented.
  23. */
  24. class NotImplementedException extends \LogicException
  25. {
  26. }
  27. /**
  28. * The exception that is thrown when an invoked method is not supported. For scenarios where
  29. * it is sometimes possible to perform the requested operation, see InvalidStateException.
  30. */
  31. class NotSupportedException extends \LogicException
  32. {
  33. }
  34. /**
  35. * The exception that is thrown when a requested method or operation is deprecated.
  36. */
  37. class DeprecatedException extends NotSupportedException
  38. {
  39. }
  40. /**
  41. * The exception that is thrown when accessing a class member (property or method) fails.
  42. */
  43. class MemberAccessException extends \LogicException
  44. {
  45. }
  46. /**
  47. * The exception that is thrown when an I/O error occurs.
  48. */
  49. class IOException extends \RuntimeException
  50. {
  51. }
  52. /**
  53. * The exception that is thrown when accessing a file that does not exist on disk.
  54. */
  55. class FileNotFoundException extends IOException
  56. {
  57. }
  58. /**
  59. * The exception that is thrown when part of a file or directory cannot be found.
  60. */
  61. class DirectoryNotFoundException extends IOException
  62. {
  63. }
  64. /**
  65. * The exception that is thrown when an argument does not match with the expected value.
  66. */
  67. class InvalidArgumentException extends \InvalidArgumentException
  68. {
  69. }
  70. /**
  71. * The exception that is thrown when an illegal index was requested.
  72. */
  73. class OutOfRangeException extends \OutOfRangeException
  74. {
  75. }
  76. /**
  77. * The exception that is thrown when a value (typically returned by function) does not match with the expected value.
  78. */
  79. class UnexpectedValueException extends \UnexpectedValueException
  80. {
  81. }
  82. /**
  83. * The exception that is thrown when static class is instantiated.
  84. */
  85. class StaticClassException extends \LogicException
  86. {
  87. }
  88. namespace Nette\Utils;
  89. /**
  90. * The exception that is thrown when an image error occurs.
  91. */
  92. class ImageException extends \Exception
  93. {
  94. }
  95. /**
  96. * The exception that indicates invalid image file.
  97. */
  98. class UnknownImageFileException extends ImageException
  99. {
  100. }
  101. /**
  102. * The exception that indicates error of JSON encoding/decoding.
  103. */
  104. class JsonException extends \Exception
  105. {
  106. }
  107. /**
  108. * The exception that indicates error of the last Regexp execution.
  109. */
  110. class RegexpException extends \Exception
  111. {
  112. }
  113. /**
  114. * The exception that indicates assertion error.
  115. */
  116. class AssertionException extends \Exception
  117. {
  118. }