Exception.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * Part of Text_LanguageDetect
  4. *
  5. * PHP version 5
  6. *
  7. * @category Text
  8. * @package Text_LanguageDetect
  9. * @author Nicholas Pisarro <[email protected]>
  10. * @license BSD http://www.opensource.org/licenses/bsd-license.php
  11. * @link http://pear.php.net/package/Text_LanguageDetect/
  12. */
  13. /**
  14. * Part of the PEAR language detection package
  15. *
  16. * PHP version 5
  17. *
  18. * @category Text
  19. * @package Text_LanguageDetect
  20. * @author Nicholas Pisarro <[email protected]>
  21. * @license BSD http://www.opensource.org/licenses/bsd-license.php
  22. * @link http://pear.php.net/package/Text_LanguageDetect/
  23. * @link http://langdetect.blogspot.com/
  24. */
  25. class Text_LanguageDetect_Exception extends Exception
  26. {
  27. /**
  28. * Database file could not be found
  29. */
  30. const DB_NOT_FOUND = 10;
  31. /**
  32. * Database file found, but not readable
  33. */
  34. const DB_NOT_READABLE = 11;
  35. /**
  36. * Database file is empty
  37. */
  38. const DB_EMPTY = 12;
  39. /**
  40. * Database contents is not a PHP array
  41. */
  42. const DB_NOT_ARRAY = 13;
  43. /**
  44. * Magic quotes are activated
  45. */
  46. const MAGIC_QUOTES = 14;
  47. /**
  48. * Parameter of invalid type passed to method
  49. */
  50. const PARAM_TYPE = 20;
  51. /**
  52. * Character in parameter is invalid
  53. */
  54. const INVALID_CHAR = 21;
  55. /**
  56. * Language is not in the database
  57. */
  58. const UNKNOWN_LANGUAGE = 30;
  59. /**
  60. * Error during block detection
  61. */
  62. const BLOCK_DETECTION = 40;
  63. /**
  64. * Error while clustering languages
  65. */
  66. const NO_HIGHEST_KEY = 50;
  67. }