Exceptions.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. //
  2. // Exceptions.cs
  3. //
  4. // Author:
  5. // Lluis Sanchez Gual <lluis@novell.com>
  6. //
  7. // Copyright (c) 2010 Novell, Inc (http://www.novell.com)
  8. //
  9. // Permission is hereby granted, free of charge, to any person obtaining a copy
  10. // of this software and associated documentation files (the "Software"), to deal
  11. // in the Software without restriction, including without limitation the rights
  12. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13. // copies of the Software, and to permit persons to whom the Software is
  14. // furnished to do so, subject to the following conditions:
  15. //
  16. // The above copyright notice and this permission notice shall be included in
  17. // all copies or substantial portions of the Software.
  18. //
  19. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25. // THE SOFTWARE.
  26. using System;
  27. namespace SharpCifs.Util.Sharpen
  28. {
  29. public class VirtualMachineError : Error
  30. {
  31. }
  32. public class StackOverflowError : VirtualMachineError
  33. {
  34. }
  35. public class BrokenBarrierException : Exception
  36. {
  37. }
  38. internal class BufferUnderflowException : Exception
  39. {
  40. }
  41. public class CharacterCodingException : Exception
  42. {
  43. }
  44. public class DataFormatException : Exception
  45. {
  46. }
  47. public class EofException : Exception
  48. {
  49. public EofException ()
  50. {
  51. }
  52. public EofException (string msg) : base(msg)
  53. {
  54. }
  55. }
  56. public class Error : Exception
  57. {
  58. public Error ()
  59. {
  60. }
  61. public Error (Exception ex) : base("Runtime Exception", ex)
  62. {
  63. }
  64. public Error (string msg) : base(msg)
  65. {
  66. }
  67. public Error (string msg, Exception ex) : base(msg, ex)
  68. {
  69. }
  70. }
  71. public class ExecutionException : Exception
  72. {
  73. public ExecutionException (Exception inner): base ("Execution failed", inner)
  74. {
  75. }
  76. }
  77. public class InstantiationException : Exception
  78. {
  79. }
  80. public class InterruptedIoException : Exception
  81. {
  82. public InterruptedIoException (string msg) : base(msg)
  83. {
  84. }
  85. }
  86. public class MissingResourceException : Exception
  87. {
  88. }
  89. public class NoSuchAlgorithmException : Exception
  90. {
  91. }
  92. public class NoSuchElementException : Exception
  93. {
  94. }
  95. internal class NoSuchMethodException : Exception
  96. {
  97. }
  98. internal class OverlappingFileLockException : Exception
  99. {
  100. }
  101. public class ParseException : Exception
  102. {
  103. public ParseException ()
  104. {
  105. }
  106. public ParseException (string msg, int errorOffset) : base(string.Format ("Msg: {0}. Error Offset: {1}", msg, errorOffset))
  107. {
  108. }
  109. }
  110. public class RuntimeException : Exception
  111. {
  112. public RuntimeException ()
  113. {
  114. }
  115. public RuntimeException (Exception ex) : base("Runtime Exception", ex)
  116. {
  117. }
  118. public RuntimeException (string msg) : base(msg)
  119. {
  120. }
  121. public RuntimeException (string msg, Exception ex) : base(msg, ex)
  122. {
  123. }
  124. }
  125. internal class StringIndexOutOfBoundsException : Exception
  126. {
  127. }
  128. public class UnknownHostException : Exception
  129. {
  130. public UnknownHostException ()
  131. {
  132. }
  133. public UnknownHostException(string message) : base(message)
  134. {
  135. }
  136. public UnknownHostException (Exception ex): base ("Host not found", ex)
  137. {
  138. }
  139. }
  140. public class UnsupportedEncodingException : Exception
  141. {
  142. }
  143. internal class UriSyntaxException : Exception
  144. {
  145. public UriSyntaxException (string s, string msg) : base(s + " " + msg)
  146. {
  147. }
  148. }
  149. internal class ZipException : Exception
  150. {
  151. }
  152. public class GitException : Exception
  153. {
  154. }
  155. public class ConnectException: Exception
  156. {
  157. public ConnectException (string msg): base (msg)
  158. {
  159. }
  160. }
  161. class KeyManagementException: Exception
  162. {
  163. }
  164. class IllegalCharsetNameException: Exception
  165. {
  166. public IllegalCharsetNameException (string msg): base (msg)
  167. {
  168. }
  169. }
  170. class UnsupportedCharsetException: Exception
  171. {
  172. public UnsupportedCharsetException (string msg): base (msg)
  173. {
  174. }
  175. }
  176. }