Source for file SqlException.php

Documentation is available at SqlException.php

  1. <?php
  2. include_once(dirname(__FILE__)."/../shared/SharedException.php");
  3. /**
  4. * OsidException or one of its subclasses is thrown by all methods of all
  5. * interfaces of an Open Service Interface Definition (OSID). This requires
  6. * the caller of an OSID package method handle the OsidException. Since the
  7. * application using an OSID can not determine where an implementation method
  8. * will ultimately execute, it must assume a worst case scenerio and protect
  9. * itself. OSID Implementations should throw their own subclasses of
  10. * OsidException and limit exception messages to those predefined by their own
  11. * OsidException or its superclasses. This approach to exception messages
  12. * allows Applications and OSID implementations using an OsidException's
  13. * predefined messages to handle exceptions in an interoperable way.
  14. *
  15. * <p>
  16. * OSID Version: 2.0
  17. * </p>
  18. *
  19. * <p>
  20. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  21. * O.K.I&#46; OSID Definition License}.
  22. * </p>
  23. *
  24. * @package org.osid.sql
  25. */
  26. class SqlException
  27. extends SharedException
  28. {
  29. /**
  30. * Blob get bytes failed
  31. * Note: This method is PHP's equivalent of a static field.
  32. *
  33. * @return string
  34. * @access public
  35. * @static
  36. */
  37. function BLOB_GETBYTES_FAILED () {
  38. return "Blob get bytes failed ";
  39. }
  40.  
  41. /**
  42. * Clob get chars failed
  43. * Note: This method is PHP's equivalent of a static field.
  44. *
  45. * @return string
  46. * @access public
  47. * @static
  48. */
  49. function CLOB_GETCHARS_FAILED () {
  50. return "Clob get chars failed ";
  51. }
  52.  
  53. /**
  54. * Connection failed
  55. * Note: This method is PHP's equivalent of a static field.
  56. *
  57. * @return string
  58. * @access public
  59. * @static
  60. */
  61. function CONNECTION_FAILED () {
  62. return "Connection failed ";
  63. }
  64.  
  65. /**
  66. * Invalid arguments
  67. * Note: This method is PHP's equivalent of a static field.
  68. *
  69. * @return string
  70. * @access public
  71. * @static
  72. */
  73. function INVALID_ARGUMENTS () {
  74. return "Invalid arguments ";
  75. }
  76.  
  77. /**
  78. * Invalid column index. Note that column numbering begins with one, not
  79. * zero.
  80. * Note: This method is PHP's equivalent of a static field.
  81. *
  82. * @return string
  83. * @access public
  84. * @static
  85. */
  86. function INVALID_COLUMN_INDEX () {
  87. return "Invalid column index ";
  88. }
  89.  
  90. /**
  91. * Data retrieval error
  92. * Note: This method is PHP's equivalent of a static field.
  93. *
  94. * @return string
  95. * @access public
  96. * @static
  97. */
  98. function DATA_RETRIEVAL_ERROR () {
  99. return "Data retrieval error ";
  100. }
  101.  
  102.  
  103. function SqlException ( $message ) {
  104. die($message);
  105. }
  106.  
  107. }
  108.  
  109. ?>

Documentation generated on Wed, 19 Sep 2007 10:26:39 -0400 by phpDocumentor 1.3.0RC3