Source for file SharedException.php

Documentation is available at SharedException.php

  1. <?php
  2. include_once(dirname(__FILE__)."/../OsidException.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.shared
  25. */
  26. class SharedException
  27. extends OsidException
  28. {
  29. /**
  30. * Unknown Id
  31. * Note: This method is PHP's equivalent of a static field.
  32. *
  33. * @return string
  34. * @access public
  35. * @static
  36. */
  37. function UNKNOWN_ID () {
  38. return "Unknown Id ";
  39. }
  40.  
  41. /**
  42. * Unknown or unsupported Type
  43. * Note: This method is PHP's equivalent of a static field.
  44. *
  45. * @return string
  46. * @access public
  47. * @static
  48. */
  49. function UNKNOWN_TYPE () {
  50. return "Unknown Type ";
  51. }
  52.  
  53. /**
  54. * Iterator has no more elements
  55. * Note: This method is PHP's equivalent of a static field.
  56. *
  57. * @return string
  58. * @access public
  59. * @static
  60. */
  61. function NO_MORE_ITERATOR_ELEMENTS () {
  62. return "Iterator has no more elements ";
  63. }
  64.  
  65. /**
  66. * Object already added
  67. * Note: This method is PHP's equivalent of a static field.
  68. *
  69. * @return string
  70. * @access public
  71. * @static
  72. */
  73. function ALREADY_ADDED () {
  74. return "Object already added ";
  75. }
  76.  
  77. /**
  78. * Circular operation
  79. * Note: This method is PHP's equivalent of a static field.
  80. *
  81. * @return string
  82. * @access public
  83. * @static
  84. */
  85. function CIRCULAR_OPERATION () {
  86. return "Circular operation not allowed ";
  87. }
  88.  
  89. /**
  90. * Unknown key
  91. * Note: This method is PHP's equivalent of a static field.
  92. *
  93. * @return string
  94. * @access public
  95. * @static
  96. */
  97. function UNKNOWN_KEY () {
  98. return "Unknown key ";
  99. }
  100.  
  101.  
  102. function SharedException ( $message ) {
  103. die($message);
  104. }
  105.  
  106. }
  107.  
  108. ?>

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